Color

Contact Us or call 1-877-932-8228
Color

Color

As you have seen in the examples above, the color property is used to set the foreground color of an element.

Code Sample:

BackgroundsAndColors/Demos/Color.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Color</title>
</head>
<body>

<h1>Color</h1>

<div style="color: red;">color: red;</div>
<div style="color: #ff0000;">color:  #ff0000;</div>
<div style="color: #f00;">color: #f00;</div>
<div style="color: rgb(255,0,0);">color: rgb(255,0,0);</div>
<div style="color: rgb(100%,0%,0%);">color: rgb(100%,0%,0%);</div>
<div style="color: hsl(0,100%, 50%);">color: hsl(0,100%, 50%);</div>

</body>
</html>

The above code will render the following:

Next