Step 03: Background and Links Colours
The splash page is very dull, being just some black text on a grey
background. Unfortunately these are the "default" colours of the web so
you'll see lots of pages with these colours. Usually it's a sign that
the person who created the page didn't know how to change the colours to
anything better! But *WE* know, so we'll change them now! The colour
change is achieved by adding extra information to the BODY
tag of the page. Here's how we'll change the colours of the splash
page:
<BODY BGCOLOR="#FFFFFF"
TEXT="#000033" VLINK="#660000"
LINK="#FF0000" ALINK="#CC0000">
The various fields in the tag define the colours of different possible aspects of the page. BGCOLOR is the background colour of the page. TEXT is for the actual text on the page. LINK is for unvisited hyperlinks. VLINK is for visited hyperlinks. ALINK is for hyperlinks that are being clicked on (mouse down).
Each colour is specified as a six digit hexadecimal number being three two-digit hexadecimal numbers which are the RGB intensity of the colour. For example, black is #000000, white is #FFFFFF, red is #FF0000, and dark blue is #000033.
Thus, the BODY tag above sets the background to white, the text to dark blue, unvisited links to bright red, visited links to dark red, and active links to nearly-bright red. Red is a good colour for links because it draws attention.
That's all for this step. Have a look at the page and you should see blue text on a white background. There aren't any links in the page yet, so you won't see any red.
|