FP2000: How to Use ALT and TITLE Attributes to Display Additional Information on Hyperlinks (264916)



The information in this article applies to:

  • Microsoft FrontPage 2000

This article was previously published under Q264916

SUMMARY

This article shows you how to use ALT or TITLE HTML attributes to display additional information when the viewer points to images or hyperlinks on your Web pages. Note that the ALT and TITLE attributes are not equivalent, and the TITLE attribute is not recognized by all browsers.

MORE INFORMATION

HTML elements can include the attributes ALT or TITLE so that additional information is displayed when the viewer points to an image or hyperlink on the page in the browser. This functionality is most commonly used to supplement an image, but it can also be used to provide additional information about text links in Microsoft Internet Explorer.

The ALT attribute applies only to images and is recognized by all common browsers, whereas the TITLE attribute applies to hyperlinks, whether text or image, as well as to images; however, it may not be recognized by browsers other than Internet Explorer.

Syntax

The following are examples of the syntax for the two attributes:
<img source="file:///C:/Photos/Mom1.jpg" alt="Picture of Mom">
				
-or-
<a href="file:///C:/Photos/Mom2.jpg" title="Photo of Mom">mother</a>
				
Notice that in the first case, the browser displays the image (Mom1.jpg) and displays the text "Picture of Mom" as a ScreenTip when the viewer points to the image; whereas in the second case, the browser displays the text "mother" as a hyperlink and displays the ScreenTip "Photo of Mom" when the viewer points to the hyperlink.

Internet Explorer recognizes the TITLE attribute when it is used in place of the ALT attribute for images, but other browsers (such as Netscape Navigator) may not. As a result, the following image reference
<img source="file:///C:/Photos/Mom1.jpg" title="Picture of Mom">
				
produces a ScreenTip when viewed with Internet Explorer, but may not when viewed with other browsers.

Modification Type:MajorLast Reviewed:12/2/2000
Keywords:kbhowto kbinfo KB264916