Alt text is a text alternative for an image, stored in the alt attribute of the img element, describing the content or function of the image.Open glossary entry → is a text alternative for an image. It is stored in the alt attribute of the <img> element and describes the content or function of the image when it cannot be seen or loaded. Alt text is used by screen readers, by search engines to classify images and when an image fails to load.
Its primary purpose is accessibility: the Web Content Accessibility Guidelines (WCAG) require non-text content to have a text alternative. Search Engine Optimization (SEO) covers all measures that help a website become more visible in unpaid (organic) search results.Open glossary entry → is an additional benefit, not a ranking hack. Basic rules for good alt text:
- describe the purpose rather than every visible detail, keep it short and concrete,
- avoid an introductory "image of" and avoid A keyword is the search term users enter into a search engine to find information, products or providers. Keywords are the basis against which rankings and visibility are measured.Open glossary entry → stuffing,
- name functional images (links, buttons) by their function,
- mark decorative images with an empty
alt=""so screen readers skip them, - additionally explain complex graphics in the visible text or in a table.
The technically correct term is the alt attribute; the colloquial term "alt tag" is common but imprecise.