Colors


Colors play an important part in how HTML looks. HTML works on the primary colors: red, green, blue. Every color is assigned a value based on its content of red, its content of green, and its content of blue. Values range from 0 to 255. These values are represented in hexadecimal format. In hexadecimal, ff equals 255, so the range is really from 00 to ff.

White represents all colors. So the combination of red, green, and blue is white. In HTML this would be ffffff.

The opposite of white is black, and in HTML black would be 000000.

Table of the basic colors and their HTML representation.
Color in English Color in HTML
black000000
blue0000ff
cyan00ffff
green00ff00
grey888888
magentaff00ff
redff0000
whiteffffff
yellowffff00

Colors may be specified for backgrounds, text, links, active links, visited links, and tables.

I understand colors? How do I use them?


[INDEX] [PREVIOUS] [NEXT PAGE] [CHAPTER 10]

Valid HTML 3.2!