What is alt text?

Alt text, short for alternative text, is the description of an image stored in the alt attribute of an <img> tag. Its first job is accessibility: screen readers announce it to people who cannot see the image, and browsers display it if the image fails to load. Its second job is search: alt text is one of the strongest signals Google has about what an image shows, for both Google Images and the page it sits on.

Good alt text for accessibility is almost always good alt text for SEO. Write for the person who cannot see the image, and the search benefit follows.

How it works

When a screen reader reaches an image, it reads the alt text in place of the picture. If the alt attribute is missing entirely, many screen readers fall back to reading the file name, such as "IMG underscore 4471 dot jpeg". An empty alt="" tells assistive technology the image is decorative and should be skipped.

Search engines combine alt text with the file name, the surrounding text, captions, and the page title to understand an image. For linked images, the alt text serves as the link's anchor text.

Alt text is required for conformance with WCAG, the accessibility guidelines that many accessibility laws reference.

Example

html
<!-- Informative image -->
<img src="dripper.jpg" alt="Water poured in slow circles over coffee grounds in a ceramic pour-over dripper">

<!-- Decorative flourish -->
<img src="divider.svg" alt="">

<!-- Bad: keyword stuffing -->
<img src="dripper.jpg" alt="coffee dripper best coffee dripper buy coffee dripper">

The same photo needs different alt text in different contexts. On a product page, describe the product; in a tutorial, describe the step it illustrates. Skip "image of", since screen readers already announce it as an image.

In WordPress

Alt text is set in the Alternative Text field in the Media Library, and the block editor's Image block has its own field. WordPress prints alt="" when none is set. Hydrogen SEO can generate alt text with AI for one image or a bulk selection (1 credit per image, free account required), optionally on upload, and has a non-AI option that fills missing alt attributes from a template such as the post title. That fallback also overwrites intentionally empty decorative alts, so read the image alt text guide first.

Common mistakes

  • Leaving informative images without alt text, especially product photos and charts.
  • Stuffing keywords or repeating the page title on every image.
  • Describing decorative images, which adds noise for screen reader users.
  • Putting essential information only in an image of text, with no alt text or on-page equivalent.

Common questions

How long should alt text be?

Usually one short sentence. There is no hard limit, but many screen readers read it in one go, so concise and specific works best. Use a caption or nearby text for longer explanations.

Does alt text help SEO?

Yes, mainly for image search and for helping Google understand the image in context. Its main value is still accessibility.