Colors
Home Up hypertext HTML HTML tags More HTML effects.htm SOUND Colors Java script FTP

Colors for the webpage

Normally, a page opens with the <body> tag. But before you close the tag, you might want to put any of the following colors in there. They all go in a single <BODY> tag. Not between the <body> and </body> tags, but IN BETWEEN the < and the > of the <body> tag: 
<body putyourcolorcodeshere>

My body tag for this page looks like this:
<BODY BGCOLOR="#FFFF33" TEXT="#3366FF" LINK="#FF0033" VLINK="#993399" ALINK="#006600">

<BODY BGCOLOR="#FFFF33">
sets the background color for the page as a whole. (yellow) 
<BODY TEXT="#3366FF">
sets the text color for the page as a whole. 
<BODY LINK="#FF0033">
sets the unvisited link color for the page as a whole. 
<BODY VLINK="#993399">
sets the visited link color for the page as a whole. 
<BODY ALINK="#006600">
sets the activated link color (i.e. the color of the link as users click on it) for the page as a whole.

<FONT COLOR="#009966">This is how you change just some text color</FONT>
sets the color of selected text within a page.

The colors are all defined by hexadecimal codes (six numbers or letters for each color).
simple ones are: 000000 for black and FFFFFF  for white. you can use all numbers and the letters A through F.

The first two characters give us _________ the next two characters give us  __________ and the last two characters give us ____________. (try it out by keeping all numbers 0 and turn the three pairs to FF's.

Attention: DON'T FORGET TO TYPE THE # BEFORE THE CODE!

Advanced: you can not put part of the page in a color (there is only one body) 
but you can turn parts of the page in different colors by using the color codes in the <FONT> tag or for a different background, you can put text in a table with differemt background colors:

<TABLE BGCOLOR="#CCFF99">
sets the background color for an entire table.
 
<TH BGCOLOR="#66FFFF">
sets the background color for one header cell within a table.
 
<TD BGCOLOR="#FFCCFF">
sets the background color for one data cell within a table.
sets the background color for an entire table. sets the background color for one header cell within a table. sets the background color for one data cell within a table.

Back to HTML or HTML tags