Web Page Colors

One of the best ways to inject a bit of design flair into our web pages is to add color. We can use colors to change the appearance of fonts, borders, backgrounds; in fact anything that has a color, we can change it!

Color names

One of the earliest ways to specify web page colors was to use color names. There are in fact almost 147 colors that are recognized in all browsers, but this choice has recently been narrowed down to just 16 officially supported colors. To use any of these colors you simply need to use it as your color value, for example p {color: fuschia}.

The table below shows these 16 colors, along with their names. You can save the table for future reference by right-clicking on it and selecting "Save Picture As...":

HTML color names

While these colors can be useful in certain circumstances, the fact that there are only 16 of them is hugely limiting. Luckily there is a much better way to specify colors, one that gives us a choice of over 16 million different colors! Move on to the next part to read all about it.