Tutorial 25: The Care and Feeding of Hyperlinks, Part I - HTML with Style | 5 | WebReference

Tutorial 25: The Care and Feeding of Hyperlinks, Part I - HTML with Style | 5


Tutorial 25: The Care and Feeding of Hyperlinks, Part I

The best breed is always titled

Remember the TITLE attribute for links. Although it's not necessary to use it all the time, TITLE assists in giving the user information about the resource being linked to. Following a link takes time, and users need to know ahead of time if they really want to follow it or not.

A good rule of thumb when deciding whether or not to use the TITLE attribute on a link is to avoid using it when the information you would give via TITLE is already available to the user. For example, I've linked to Tutorial 2 several times in this article. Sometimes, I link to it like this:

... as we saw in <A HREF="/html/tutorial2/">Tutorial 2</A> ...

In this case, the reader already knows that what is being linked to is Tutorial 2. However, if I'm linking to a passage in tutorial 2 without naming it, a TITLE attribute lets the user know what the link points to.

... which is a topic I have <A HREF="/html/tutorial2/5.html"
 TITLE="Tutorial 2 - Understanding Hyperlinks: Heads or Tails?"
>covered previously</A> on HTML with Style ...

TITLE attributes are usually displayed as "tooltips" when the user passes the pointer over a link on graphical browsers. Lynx shows them when you request information about a link. In addition to the TITLE attribute, a very important hint as to what a link points to is the URL. Most browsers will display this in the status bar if the user moves the pointer over a link. For this reason, it is a bad idea to change the text on the status line, like many designers do, using JavaScript or some similar technique. The status line provides useful information to the user; displaying advertising or other text on it will soon annoy your readers and decreases the usability of your site.

An obvious corollary of the above rule of thumb is that you should always use the TITLE attribute on LINK and AREA elements. These elements have no text related to them and offer no contextual clues as to what the link points to. In the case of graphics, the use of the ALT attribute is also compulsory, whether on the image itself if it is a single link, and on the AREA elements if it uses a client-side image map.


Next Page...


URL: http://www.webreference.com/html/tutorial25/4.html

Produced by Stephanos Piperoglou
Created: September 27, 2000
Revised: October 4, 2000