Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

Setting the font color

To change the colour of text, enter the colour name or use the red-green-blue colour value. For example:

<font color="blue">
<font color="#0000FF">

Include the " and # marks to be on the safe side. Some browsers don’t need them; some do. For more information on colours, see Using colour.

You can apply colour changes to a paragraph, a sentence, one or more words or a letter.

This HTML…

Displays as…

<p><font color="blue">You can have a blue paragraph.</font></p>

<p>You can have a paragraph.<font color="red">Here is a red sentence. </font>Some more text in the para.</p>

<p>You can have a single <font color="green">green</font> word.</p>

<p>You can have a single <font color="purple">p</font>urple letter</p>

To apply the change to several paragraphs; just enclose the paragraphs in the <font> tag.