Setting Background and Text Colour
By Anne Laidlaw
The <BODY> tag uses very important attributes to make up the look of your web page. Use the BGCOLOR attribute and value to change your web page's background colour.To use all Web-safe colours, you'll need to use hexadecimal colour codes. Alou's Webmaster's Colour Chart displays safe colours with their hex codes, allowing you to view colours in different combinations.
For our sample page, let's keep things simple and use a plain white background. The hexadecimal code for white is #FFFFFF, so we'll add an attribute to the existing <BODY> tag so that it reads:
<BODY BGCOLOR="#FFFFFF">
Background Images
You can also use an image as your background. Any image you choose will tile into the background--that is, it will go into the background without changing size and then reproduce itself over and over to fill the page. Never use a background that makes text difficult to read. To tile an image, add the BACKGROUND attribute to the BODY tag (bgimage.gif is a sample background image):
<BODY BACKGROUND="bgimage.gif">
Stick with a simple white or light coloured background to keep the design uncluttered, make the text easy to read, and ensure that the links stand out.
Text Colours
You can apply hex or name values to attributes of the <BODY> tag to designate the colour of your page's regular text and linked text. The TEXT attribute sets the colour of the regular text. The LINK attribute controls the colour of linked text. VLINK designates the colour of a followed link; it's helpful when you're presenting a list of links because it lets your users distinguish the pages they've already visited. Finally, ALINK designates the colour that links become when clicked. ALINK is usually the same value as VLINK. For our page, we're going to have black (#000000) text and bright blue links (#33FFFF) that turn dark purple (#330066) when clicked and followed:
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000ff" ALINK="#cc0000">