Adding Color in HTML
- Use a Red-Green-Blue Hexadecimal
Triplet to describe the color. This is also called a RGB Hex Triplet,
or just a Hex Triplet.
- The first two digits are for how much red,
the second two are for the green, the
last two for the blue.
- Here are some examples: #9966CC, #00FF33, #CC0099, #000033, #FFFF66. Always
use the # before the six digits.
- Hexadecimal digits go from 0 to F, so: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A,
B, C, D, E, F
- Here are some easy 2-digit values to use:
- 00 = none
- 33 = dim
- 66 = medium-dim
- 99 = medium-bright
- CC = bright
- FF = maximum bright
- Other 2-digit numbers can be used but will not show up the same on all
To color the whole page, the <BODY> tag at the top must be changed...
- Example: change the background to red: <BODY BGCOLOR="#FF0000">
- Example: change the text to green: <BODY TEXT="00FF00">
- Example: change both: <BODY BGCOLOR="#FF0000" TEXT="#00FF00">
To make only some of the words or letters change color...
- Use <FONT COLOR="#0000FF"> at
the place where you want the color to start changing.
- Note, there is a space between
FONT and COLOR. They are two seperate codes.
- To go back to the regular font,
Links are automatically BLUE and PURPLE. So don't use colors
link those for your background.