HTML Element Style How to - Mark White text and black background








Question

We would like to know how to mark White text and black background.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
h3 {<!--  w  ww  .  ja  v  a2 s  . c om-->
  width: 100px;
  text-align: center;
  color: white;
  background: black;
}
</style>
</head>
<body>
  <h3>SELL ANYWHERE</h3>
</body>
</html>

The code above is rendered as follows: