Skip to content

Alt Text

The `alt` attribute on `<img>` describing the image's content or function; required by WCAG for every meaningful image.

Alt text is the text alternative to an image, exposed to screen readers, search engines, and viewers when the image fails to load. It's set via the alt attribute on <img>. WCAG 2.2 Success Criterion 1.1.1 (Non-text Content, Level A) requires alt text on every image that conveys meaning.

For decorative images (visual flair with no informational value), use alt="" (empty, NOT missing). Screen readers skip empty-alt images entirely. A missing alt attribute is treated as content and screen readers fall back to reading the filename, which is almost always worse than silence.

Good alt text describes the image in context, not in isolation. A photo of a person on a checkout page might be alt="Customer support representative" on the about page and alt="" on the checkout (where the photo is decorative). Don't write "Image of..." -- screen readers already announce it as an image.

Related terms

Further reading

Send Feedback