From Htmlpedia
Jump to: navigation, search

Access: []: <img> missing 'alt' text (Priority 1)


All images -- including transparent GIFs -- must have "alt" text (short for "alternate"). Alternate text describes the information in the image, which is useful for three important purposes:

  • Screen reading software uses the alt text to tell visually impaired visitors what the image contains.
  • Search engine spiders use the alt text to index the image so that it can be searched for.
  • Alt text replaces the image if it fails to load, so that the visitor can get an idea what it was about even though it's not there.

Some user agents render the alt text as a tool-tip: the little yellow box that pops up when you hold your mouse cursor over the image.

Alternate text should be concise (i.e. 10-12 words maximum containing no more than 150 characters including spaces and punctuation). For transparent images and spacers, use alt="" (NULL), alt=" " (spaces are acceptable), or alt="blank". Any words depicted in the image should also appear in the "alt" text description.


Bad<img src="banana.jpg">
Good<img src="banana.jpg" alt="A picture of a banana.">


Add a concise (no more than 150 characters) description of the image as an alt attribute.