You are here:

  1. Manual
  2. Development
  3. Images
  4. The alt attribute
  5. Tooltips

Images and alternate text: The alt attribute and tooltips

The alt attribute was never meant for displaying a so-called tooltip. A tooltip is a small (often yellow-coloured) window containing text. It appears when a visitor rests the mouse pointer on the element.

Tooltips generated by an alt attribute are only supported by Microsoft Internet Explorer. Users of this browser can disbale the display of alt tooltips.

The use the alt attribute for tooltips is improper. An alt attribute serves as an alternative for an image and cannot be complementary to the image.

Do not use an alt attribute to display tooltips.

Guideline R-pd.7.2

Displaying tooltips

The web developer or content manager who wants to display a tooltip for the visitor, must use the title attribute, instead of the alt attribute; title attributes can be applied to virtually all HTML elements, not just images.

Suppressing tooltips

Some web developers or content managers may want to suppress the display of alt attributes as tooltips by Microsoft Internet Explorer. They can achieve this by adding a title attribute with an empty value. The title attribute overrules the alt attribute in tooltip display. As a result, no tooltip will be displayed on the image.

Never sacrifice the alt attribute when trying to prevent tooltips display!


Web Guidelines version 1.3, November 2007.