O'Reilly logo

Web Design in a Nutshell by Jennifer Niederst

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Affecting the Appearance of Links

As we all by now know, linked text is blue and underlined by default and graphics are identified by blue borders (unless you turn them off). But it doesn’t have to be that way! Changing the color of links is easy with HTML, so you can make your links more coordinated with your chosen site palette. Style sheets offer even more control over the appearance of links.

You should exercise some caution in changing link appearance. The blue text and underlines have become a strong visual clue for “click here,” so altering this formula may confuse your users. Use your knowledge of the savvy of your target audience to guide your design decisions.

Setting Colors in <body>

Link color specifications in the <body> tag are applied to the whole document.

Links

<BODY LINK=" color ">

Sets the color for hyperlinks. The default color for links is blue.

Visited links

<BODY VLINK=" color ">

Sets the colors for links that have already been clicked. The default color for visited links is purple.

Active links

<BODY ALINK=" color ">

Sets the color for a link while it is in the process of being clicked. The default color for an active link is red.

Specifying Color for a Specific Link

You can override the color of a specific link by placing <font> tags within the anchor tags. There is no way to set the visited link and active link colors for specific links. This feature is supported by versions 3.0 and 4.0 of Internet Explorer, but only version 4.0 of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required