Affecting the Appearance of Links

As we all know by now, 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. In general, as long as the link colors are consistent throughout a site and noticeably different from the default text style, changing the color is not a problem for the usability of the site.

Setting Colors in <body>

Link color specifications in the <body> tag are applied to the whole document. See Chapter 16 for instructions on providing color values for the following attributes.

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 ...

Get Web Design in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.