# Alt text

Category: [On-Page & Content](https://seo-geo-glossary.com/en/glossary/category/on-page-content/) › [Headings, images & media](https://seo-geo-glossary.com/en/glossary/category/on-page-content/headings-images-media/) · Also known as: alt attribute, alternative text, alt tag, image alt text

**Alt text** (alternative text) is a short written description of an image, placed in the `alt` attribute of an HTML `img` element. Screen readers read it aloud, browsers display it when the image fails to load, and search engines use it to understand what the image shows.

## What is alt text used for?

**Accessibility.** WCAG success criterion 1.1.1 (Level A) requires a text alternative for all non-text content that serves the equivalent purpose. Images that are purely decorative should be marked up so assistive technology can skip them. In the US, Section508.gov lists alt text as a requirement of the Section 508 standards for federal digital content.

**Fallback.** If an image cannot be loaded, for example because of a network error or a broken path, the browser shows the alt text in its place.

**SEO.** Google calls alt text the most important attribute for giving more metadata about an image. Google combines it with computer vision and the surrounding page content to understand the image's subject. When an image is used as a link, Google treats its alt text as the link's anchor text. Images added only through CSS are not indexed by Google, so an image that should appear in Google Images needs a real `img` element.

The common term "alt tag" is technically imprecise. `alt` is an attribute of the `img` element.

## How to write good alt text

Describe what the image contributes in its context, as briefly as possible. The same photo may need different alt text on a product page and in a news article. WebAIM recommends a few words, rarely more than a sentence or two, and advises against openings like "image of" because screen readers already announce that an image is present. If the image contains text, repeat that text. For complex graphics such as charts, keep the alt text short and put the full explanation in the body copy or a linked description.

## Example

```html
<!-- Informative image: describe what matters -->
<img src="cargo-bike-red.jpg"
     alt="Red longtail cargo bike with two child seats, parked by a brick wall">

<!-- Decorative image: empty alt so screen readers skip it -->
<img src="wave-divider.svg" alt="">

<!-- Image as the only link content: describe the destination -->
<a href="/cart/">
  <img src="icon-cart.svg" alt="View cart">
</a>
```

## Common mistakes

- **Missing alt attribute.** Some screen readers then read out the file name, which is rarely helpful.
- **Keyword stuffing.** Google says alt attributes filled with keywords create a poor user experience and may cause a site to be seen as spam.
- **Describing decoration.** Ornamental graphics need `alt=""`. A description only adds noise for screen reader users.
- **Empty alt on linked images.** The link then has no accessible name, and Google has no anchor text for it.
- **Unreviewed automatic descriptions.** Section508.gov advises against relying on default or AI-generated alt text.

## FAQ

**What does alt text mean?**
It is the text alternative for an image, stored in the `alt` attribute. It stands in for the image when someone cannot see it.

**Is alt text legally required?**
Section508.gov lists alt text as a requirement of the Section 508 standards, which apply to US federal digital content. WCAG success criterion 1.1.1 (Level A) asks for a text alternative for non-text content.

This is not legal advice.

**Can AI write alt text?**
Section508.gov advises avoiding default or AI-generated alt text, because such descriptions usually do not communicate the actual purpose of the image. A person should review and edit any draft before publishing.

**Does every image need alt text?**
Every `img` element needs an `alt` attribute. For purely decorative images it stays empty.

## At a glance

- **Type:** HTML attribute alt on the img element
- **Affects:** screen readers, Google Images, anchor text of image links
- **Accessibility:** [WCAG 2.2 success criterion 1.1.1 (Level A)](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html)
- **Decorative images:** alt="" (empty)
- **Docs:** [Google: Image SEO best practices](https://developers.google.com/search/docs/appearance/google-images)

Last checked: October 8, 2026

## Related terms

- [Anchor text](https://seo-geo-glossary.com/en/glossary/anchor-text/index.md)
- [Web accessibility](https://seo-geo-glossary.com/en/glossary/web-accessibility/index.md)
- [Google Images](https://seo-geo-glossary.com/en/glossary/google-images/index.md)
- [Image SEO](https://seo-geo-glossary.com/en/glossary/image-seo/index.md)

## Sources

- [Google image SEO best practices – Google Search Central (last updated 2026-03-02)](https://developers.google.com/search/docs/appearance/google-images)
- [SEO link best practices for Google – Google Search Central](https://developers.google.com/search/docs/crawling-indexing/links-crawlable)
- [Understanding Success Criterion 1.1.1: Non-text Content – W3C WCAG 2.2](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html)
- [Decorative Images – W3C WAI Images Tutorial](https://www.w3.org/WAI/tutorials/images/decorative/)
- [<img>: The Image Embed element – MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img)
- [Alternative Text – WebAIM (secondary source)](https://webaim.org/techniques/alttext/)
- [What is Alternative Text? – Section508.gov](https://www.section508.gov/training/alt-text/what-is-alternative-text/)

---

Last updated: October 8, 2026
URL: https://seo-geo-glossary.com/en/glossary/alt-text/
