The body color for this page is white. It was set with a CSS style rule, but in HTML you can add bgcolor="#FFFFFF" to the body tag.
The "#FFFFFF" is a series of hexidecimal numbers. Computer folks are used to using letters in numbers, but the rest of the world is not. Here is a brief summary of how this color system works followed by some "pre-mixed" colors.
Color is specified in HTML by setting the amounts of the three primary colors present in white light:
red, green, and blue
In the example above, FFFFFF, there are actually three sets of numbers, one for each primary, and the code is called a "triplet":
FF, FF, and FFThe decimal system of numbers that you are accustomed to using has 10 digits, 0 through 9. Hexidecimal has 16 digits, 0 through 9 and A thru F, and counts like this: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. So the highest number represented in two decimal digits is 99, and in hexidecimal it is FF. FF "hex" is equivalent to 255 in conventional decimal. This means that in our color triplet above:
Red is set to FF (maximum red),
Green is set to FF (maximum green), and
Blue is set to FF (maximum blue)
Maximum amounts of all three primary colors = white (the color of this page). If the background color setting of the body tag had been bgcolor="#000000" instead, then the page would have been black. This text would be difficult to read.
Using these principles, the following body color settings will illustrate the method of arriving at various colors for body backgrounds -- or any other element colors, such as for fonts:
bgcolor="#000000" = black
bgcolor="#ffffff" = (white)
bgcolor="#ff0000" = red
bgcolor="#00ff00" = green
bgcolor="#0000ff" = blue
bgcolor="#ffff00" = yellow
bgcolor="#00ffff" = cyan
bgcolor="#ff00ff" = magenta
bgcolor="#999999" = gray
bgcolor="#cccccc" = light gray
bgcolor="#333333" = dark gray
bgcolor="#660000" = dark red
bgcolor="#006600" = dark green
bgcolor="#000066" = dark blue
| Hint: |
| Note that all these colors are made up of the digits 00, 33, 66, 99, CC and FF. Limiting your colors to combinations of these six choices (referred to as the web-safe palette) is necessary to ensure that your color choices will display the same on multiple computer platforms. Departing from this practice can generate some bizare color schemes. |
If you don't get this hexidecimal stuff, just refer to this color chart to choose your colors. The only thing governing your choices are taste and readability. It is easy to make pages ugly and unreadable -- the trick is to make pleasing or exciting pages that visitors want to return to, again and again.
Text normally defaults to black in IE and Firefox. Changing text color is similar to changing the body background, and the colors of links can also be changed separately from text. To do this the following attributes are set in the body tag:
| bgcolor="#ffffff" | Body background color is white |
| text="#990000" | Text color is medium red |
| link="#009900" | Unvisited links are medium green |
| vlink="#330000" | Visited links are dark green |
| alink="#00cc00" | Active link is light green ("Active" means the color of the link while the mouse button is clicked on it. May not be supported by all browsers.) |