Skip to content

Library Glossary

Alt text (alternative text for images)

What alt text is, an HTML example, who reads it, when it stays empty, and how it differs from the title attribute, a caption and the file name.

By CentralUpdated 23 November 20263 min read4 sources, checked 23 November 2026
On this page
  1. What alt text is in practice
  2. Who reads alt text
  3. When the attribute stays empty
  4. Alt text, title, caption and file name
  5. What it means for a shop

Alt text is the text in an image's alt attribute that stands in for the image when it cannot be seen: screen readers read it aloud, search engines use it to understand the image, and browsers show it when the image does not load.

Image alt text generatorFree tool5 free runs a day

What alt text is in practice#

Alt text is a short description that lives in the HTML of a page, in the alt attribute of an image. Shoppers who see the image never notice it. It matters for everyone and everything that does not see the image: a person using a screen reader, a search engine's crawler, a browser that could not load the file.

<img src="/images/northpeak-beam-400-headlamp-black-front.jpg"
     alt="Northpeak Beam 400 rechargeable headlamp in black, front view"
     width="1500" height="1500">

The HTML standard states the goal in one sentence: replacing every image with the text of its alt attribute should not change the meaning of the page. In a shop system you rarely type the attribute yourself. You fill an "alt text" field on the image, and the theme writes the attribute.

Who reads alt text#

ReaderWhat it does with alt textSource
Screen readersRead the text aloud in place of the image. WCAG success criterion 1.1.1 (Level A) asks for a text alternative that serves the equivalent purposeW3C, Understanding 1.1.1
Search enginesGoogle uses alt text to understand what an image shows, and as anchor text when the image is a linkGoogle Search Central
BrowsersShow the text in place of an image that is not availableHTML standard

When the attribute stays empty#

A purely decorative image gets an empty attribute: alt="". W3C's page on decorative images says this lets assistive technologies ignore the image. Leaving the attribute out is not the same: W3C notes that some screen readers then announce the file name.

Alt text, title, caption and file name#

ThingWhere it isWho sees itWhat it is for
Alt textalt attribute of imgNot visible while the image showsStands in for the image
Titletitle attributeOften a tooltip on mouse hoverSupplemental information, in the HTML standard's words. The description of the image belongs in alt
CaptionVisible text next to the image, for example figcaptionEveryoneAdds context that all readers should get
File nameThe last part of the image URLVisible in the URL onlyGoogle recommends short, descriptive file names such as northpeak-beam-400-headlamp-black-front.jpg over IMG00023.JPG

The four do not replace each other. An image with a caption still needs an alt attribute, and a descriptive file name does not describe the image to a screen reader user.

What it means for a shop#

A product page has many images, and each needs its own alt text: the product, the variant shown and what this image adds, such as the view or a detail. The guide to alt text for product images has a formula, 12 before and after examples and what EU law says about online shops. The free image alt text generator writes alt text for an uploaded or linked image in 12 languages.

Questions

Is it alt text, alt tag or alt attribute?

In HTML it is an attribute: alt on the img element. "Alt tag" is a common but inexact name for the same thing, and "alt text" is the text you put into the attribute.

What is the difference between alt text and a caption?

Alt text replaces the image for people and programs that cannot see it and is normally not visible. A caption is visible text next to the image that everyone reads. The HTML standard says alt text should never contain what could be the image's caption, title or legend.

Does every image need alt text?

Every img element needs an alt attribute, but not every one needs text in it. An image that carries content gets a description. A purely decorative image gets an empty attribute (alt=""), so that assistive technology skips it.

Sources

  1. HTML Standard: Requirements for providing text to act as an alternative for images (4.8.4.4)WHATWGchecked 23 November 2026
  2. Images Tutorial: Decorative ImagesW3C Web Accessibility Initiativechecked 23 November 2026
  3. Understanding Success Criterion 1.1.1: Non-text Content (WCAG 2.2)W3Cchecked 23 November 2026
  4. Image SEO best practicesGoogle Search Centralchecked 23 November 2026

More on this topic

Product images

You choose what goes in and where it goes out.

Central AI does everything in between. Your first 3 products are free.

  1. Your inputYour shop, your files or your product pages.
  2. Central AIResearches, verifies and writes everything in between. Every value is backed by sources you can check; what the sources do not support is held back.
  3. Your channelsProduct data and listings for the channels you choose.