Lesson #3: Using Colors in HTML

HTML COLOR CODES
#
HTML Color Code
COLOR
1
<font color="#FFFFFF"> White
2
<font color="#999999"> Grey
3
<font color="#000000"> Black
4
<font color="#FFCCCC"> Pink
5
<font color="#FF0000"> Red
6
<font color="#990000"> Dark Red
7
<font color="#FF9900"> Orange
8
<font color="#FFFFCC"> Light Yellow
9
<font color="#FFCC00"> Dark Yellow
10 <font color="#99FF99"> Light Green
11 <font color="#009900"> Dark Green
12 <font color="#663300"> Brown
13 <font color="#33CCFF"> Light Blue
14 <font color="#3333FF"> Medium Blue
15 <font color="#000099"> Dark Blue
16 <font color="#CC66CC"> Light Purple
17 <font color="#993366"> Dark Purple
.
About HTML Color Codes


HTML Color codes are used to change the color of text, web page backgrounds, and Backgrounds of Tables, Rows, Columns and Cells (more about tables later).

As you can see on the left side of this screen, each color has its own code to let Internet Browsers know which colors should be displayed.

There are hundreds of colors available but I have provided the codes for 17 of the most common colors used.

You will NOT need to memorize these. I just thought you should know and see how color codes are used.

Changing Text Colors
Using a text editor to use a particular color text (in the <body> section of your web page).

To use Red you would type

<font color="#FF0000">RED TEXT</font>

The Result in your web browser would be: "RED TEXT"
 
*IMPORTANT TIP
Be sure to use high contrast between your background color and your text color.
 Good Contrast Example  Bad Contrast Example
Good Contrast Example Bad Contrast Example
Notice the example on the left is easy to read and stands out Unlike the example on the right is much harder to read.



Previous Lesson #2 Adding Text To Your Web Site <Lesson #3: "Using Colors in HTML"> Next Lesson #4 "Web Site Structure"