HTML Tutorial – 05 – Colors
Colors in HTML can be specified either by using a hexadecimal notation or by typing the name of the color.
Hexadecimal color notation
The hexadecimal notation uses a red-green-blue triplet, prefixed by a hash mark (#). Hexadecimal means base-16 counting, so valid digits are 0 through 9 and A through F. Each value can range from 00 to FF, or 255 in decimal notation. All in all this gives 16 million available colors.
<!-- white specified using hexadecimal notation -->
#FFFFFFNamed color notation
The named colors include only 16 names suggested by the HTML specification. However, all major browsers recognize over a hundred different color names.
<!-- white specified by name -->
"white"Example colors
Below some example colors and color codes can be seen.
| Name | Hex | Color |
|---|---|---|
| Black | #000000 | |
| Navy | #000080 | |
| Blue | #0000FF | |
| Cyan | #00FFFF | |
| Lime | #00FF00 | |
| Green | #008000 | |
| Indigo | #4B0082 | |
| Purple | #800080 | |
| Violet | #EE82EE | |
| Gray | #808080 | |
| Silver | #C0C0C0 | |
| Gold | #FFD700 | |
| Yellow | #FFFF00 | |
| Orange | #FFA500 | |
| Red | #FF0000 | |
| Brown | #A52A2A |
If you like this tutorial please +1 it:


![[Affiliate link] Total Training]( http://d3qzmfcxsyv953.cloudfront.net/images/pvt-affiliates/totaltraining.png)
![[Affiliate link] Lynda](http://d3qzmfcxsyv953.cloudfront.net/images/pvt-affiliates/lynda.png)


Using HTML only you can change the text color like this:
<font color=”#FFFFFF”>white text</font>
However, the font element has been deprecated in favor of CSS. With CSS you can change the text color for example like this:
<span style=”color: #FFFFFF”>white text</span>