SEARCH / BROWSE
BEST PRACTICES
PLANNING PROJECTS
LIBRARY WEBSITE
AUTHOR RESOURCES

Standards/Guidelines
Policies/Procedures
Tools
Tutorials
References
Web Groups
History
Home
ABOUT DPG
library website tutorials

When and how to use the Alt and Title attributes

All image tags in a web page are required by Section 508 to include an alt text attribute. The alt text attribute is used by screen readers for people with disabilities. It is also used to display an image's descriptive text in a non-graphical browser, and in a browser in which images have been turned off.

HTML mark-up:
<img src="images/header1.gif" alt="Math Statistics Library">

IE with images turned off

Internet Explorer and older versions of Netscape display the alt text of an image as a mouse-over "tool tip." Newer browsers such as Netscape 7 and Mozilla will not show the alt text as a tool-tip. Instead they use the title text attribute for this purpose. Web designers who wish to ensure that their Netscape 7 and Mozilla users see a tool-tip for images may add the title text attribute to img src tags, with presumably the same description that is used for the alt text attribute, although it can be different. Web designers must remember that a title text attribute for an image does not replace the alt text attribute; it is an optional addition.

HTML mark-up:
<img src="images/header1.gif" alt="Math Statistics Library" title="Math Statistics Library">

NS with tool tip

The title text attribute can be used to offer alternate text for web page features in addition to images. For example, the title text attribute may be applied to a link to offer an additional, or in-depth textual description of the link. In a graphical browser, the title attribute text would appear as a tool-tip, while a screen reader would actually read this alternate text to further describe the link for the user.

HTML mark-up:
<a href="about.html" title="information about the hours, collections and services of the Math Statistics Library">About the Library</a>

Link with a tool tip

Another application of the title text attribute is to provide futher description of a form field, so that the user might get a more complete explanation of the form field being filled out.

HTML mark-up:
<textarea rows="10" cols="55" name="comments" title="Enter your comments about the Library Web, or The Library in general"></textarea>

Form field with a tool tip
| UC Berkeley Library Home | Catalogs | Search the Library Website |
Copyright (C) 2006 The Regents of the University of California. All rights reserved.
Document maintained by the Digital Publishing Group.
Last updated 06/09/2006. Server manager: contact