|
HTML Tip:
Add Titles to Your Links
by Tom Dahm,
Chief Operations Officer,
NetMechanic, Inc.
Microsoft Internet Explorer has supported the TITLE attribute for links since version 4.0. Netscape began supporting it in version 6.0
The TITLE attribute allows you to enter descriptive text about a link that's displayed when the mouse moves over the link. For an example, move your mouse over the link below:
The HTML source code for this link is shown below:
<a href="http://www.netmechanic.com"
title= "Click here to check your site's
links!">Link Check</a>
|
If your browser supports the TITLE attribute you should see a small popup box appear, similar to the way alternate text for images is displayed when you move your mouse over the image.
This attribute is similar to the ALT attribute for the IMG tag, both in its appearance and its limitations. The value of the attribute must be inside quotation marks, and it can only contain plain text (no HTML tags). You can include carriage returns in the title, and these will be displayed in the text. The maximum length of the TITLE text for Internet Explorer is very large; we've tested it with over 1000 characters. Try to keep your descriptions below 25 words, though; much more than this can be hard to read.
The TITLE attribute is useful in places where your HTML design limits the length of your link text. That's often the case for links in a navigation bar, especially if your page has a multi-column layout. Try using the TITLE attribute to give your visitors extra navigation information.
This attribute is part of the HTML 4.0 standard. Internet Explorer, Netscape 6.x and Opera (Version 3.0 or higher) support it. However, the attribute degrades gracefully, visitors with non-supporting browsers (like Netscape 4.x) would see the link as if you hadn't used the attribute.
|