CSS Property Value How to - color: red;








Question

We would like to know how to color: red;.

Answer


<!DOCTYPE html>
<html lang="en">
<head>
<title>Example of HTML Embedded Style Sheet</title>
<style type="text/css">
body {<!--from  w  w w. j av  a  2  s .  co m-->
  background-color: YellowGreen;
}

h1 {
  color: red;
}

p {
  color: green;
}
</style>
</head>
<body>
  <h1>This is a heading</h1>
  <p>This is a paragraph.</p>
</body>
</html>

The code above is rendered as follows: