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

Changing the colour of links

You can change the colour of links although I'm not sure I can see a good reason to do it. If people expect to see links in particular colours, they may not recognise them if you change the colour. Any way………

You can change the colour for new links that have not been visited (link), links which have already been visited (vlink) and active links which the user clicks on (alink).

To change the colours:

  • Put the cursor in the <body> tag
  • Type link=, vlink= or alink= followed by a hexadecimal, a red-green-blue colour value or a predefined colour name. Using colour describes the available colours

To set the colour of new links to blue, visited links to purple, and active links to red:

<body link="0000ff" vlink="800080" alink="ff0000">

This displays as: