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. 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 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.