next up previous
Next: Tables Up: Web Page Layout Previous: Image Backgrounds

Text Colour

You can change the colour of text on your web page in much the same way as you set the background colour.

You can change the colour of all the text on page by setting the TEXT attribute of the BODY tag. For example:

<body text = "#FF0000">

gives us red text on our page.

Make sure that the text colour is not the same (or does not clash) with the background colour or colours in a background image otherwise you will not be able to read the text.

For Example, in the Tiled Background2 example above the background image is essentially black: Therefore, the (default) text colour of black ink is not much good. Try reading this web page Tiled Background2 without text colour changed. This is much better: Changed Text colour Tiled Background2 where the text has been changed to white. <body background = "rivet4.GIF" text = "#FFFFFF">

You can also colour individual portions of text with the <FONT> tag by setting the COLOR attribute.

For Example:

Multicoloured text:
<br>

<font color = "#FF0000">
This is RED text
</font><br><br>

<font color = "#00FF00">
This is GREEN text
</font><br><br>

<font color = "#0000FF">
This is Blue text
</font><br><br>

Which gives:

Multicoloured text:
This is RED text

This is GREEN text

This is Blue text



Dave Marshall
9/28/2001