Alt Text
Alt text explained: what the alt attribute does, how Google uses it, how to write it for informative, linked, decorative, and complex images, and how to audit it.
- #On-Page SEO
- #SEO Glossary
- #Image SEO
- #Accessibility
In Plain English
Alt text is the text alternative in an image's HTML alt attribute. It tells screen-reader users and search engines what an image contributes to the page, and it replaces the image when the file cannot load.
Key Takeaways
- Alt text describes what an image contributes on this specific page, not everything visible in it
- Decorative images need an empty alt attribute, while a missing attribute is an error that screen readers may fill with the filename
- Google uses alt text together with page content and computer vision, and keyword-stuffed alt text can be treated as spam
Deep dive
Quick definition
Alt text is the text alternative stored in the alt attribute of an image. Screen readers announce it, browsers show it when the file fails to load, and search engines read it as an explicit statement about what the image means.
Good alt text answers one question: what does this image contribute to this page? It is not a caption, not a filename, and not a place for keyword lists. Sometimes the right answer is an empty attribute, because the image adds nothing that the surrounding text does not already say.
The three jobs of alt text
Alt text serves three audiences at once, and they rarely conflict.
- People using assistive technology. A blind user hears the alt text in place of the image. Without it, they miss whatever the image was meant to show, or they hear a meaningless filename.
- Everyone when the image fails. On a slow connection, with images blocked, or after a broken CDN path, the browser renders the alt text where the image should be.
- Search engines. Google uses alt text together with page content and computer vision to understand an image. For a linked image, the alt text works much like the anchor text of a text link.
Accessibility is the primary purpose. WCAG 2.2 makes text alternatives a Level A requirement (success criterion 1.1.1), the most basic conformance level. In the EU, the European Accessibility Act has applied to certain products and services since June 28, 2025. Whether it covers your site is a legal question. The SEO benefit follows from doing the accessibility job well.
Where alt text lives in HTML
The attribute belongs on the <img> element. It also applies to <input type="image"> buttons and to <area> elements in image maps.
html<!-- Informative image: the alt describes what matters here -->
<img src="crawl-depth-chart.png" alt="Bar chart: most product pages sit four or more clicks from the homepage">
<!-- Decorative image: empty alt, so screen readers skip it -->
<img src="divider-wave.svg" alt="">
<!-- Missing alt: an error, not a decision -->
<img src="team-photo.jpg">
The difference between the second and third example matters. An empty attribute (alt="") is a deliberate statement that the image carries no information. A missing attribute leaves the decision to the screen reader, and many of them fall back to reading the filename or URL. "team-photo dot jpg" helps nobody.
Decide by purpose, not by appearance
The W3C Web Accessibility Initiative groups images by function. That grouping is the most reliable way to write alt text, because the same picture can need different text in different places.
Informative images
Photos, illustrations, and screenshots that convey information need a short description of that information. Describe what the reader should take away, not every pixel.
Functional images
When an image is a link or a button, describe the action or destination. A magnifying-glass icon inside a search button should say "Search", not "magnifying glass". A logo linking to the homepage usually needs the company name or "Home".
Decorative images
Ornaments, background textures, and stock photos that only set a mood get alt="". If the image sits inside a link that already has visible text, it is often redundant too and can stay empty.
Complex images
Charts, diagrams, and maps hold more information than a short alt can carry. Give them a brief alt that names the image and its main finding, then put the full data or explanation in nearby text or a table.
Images of text
If an image contains words that matter, those words belong in the alt text. Better still, publish the text as real HTML, which WCAG also recommends wherever possible.
How Google uses alt text
Google's image SEO documentation is direct about this. Alt text is one input, used alongside the page's content and computer vision, to understand what an image shows. It also helps Google connect the image with relevant queries in Google Images.
Three consequences follow from that.
- Alt text supports image understanding and discovery. It is not a lever that pushes a page up in web rankings on its own.
- For linked images, Google treats the alt text as anchor text. An unlabeled image link passes no descriptive signal about its target.
- Google's guidance warns against filling alt attributes with keywords. Stuffed alt text creates a bad experience and can cause the site to be treated as spam, the same problem as stuffing visible text (see keyword density for why repetition is not a quality signal).
Modern image models can interpret pixels without help, and AI search features increasingly work with images directly. That does not make alt text obsolete. A model can see that a photo shows a red jacket. It cannot know that this specific jacket is the waterproof model your page is about, unless the page says so.
If your images matter for traffic, check the "Image" search type in the Performance report of Google Search Console. It shows which queries surface your images and whether anyone clicks.
How to write good alt text
A short set of rules covers most cases.
- Write for this page. Describe the image's role in the surrounding content. The same product photo may need "Front view of the Model S backpack" on the product page and "Our bestselling backpack" in a blog post about sales.
- Lead with the important part. Screen-reader users hear the text linearly. Put the essential information first.
- Be specific where it matters. "Dalmatian puppy catching a ball" is more useful than "dog". Do not add details that are not visible or not relevant.
- Skip "image of" and "picture of". Screen readers already announce that the element is an image. Mention the medium only when it matters, such as "Oil painting of" or "Screenshot of".
- Do not repeat the caption. If a visible caption already says everything, the alt can be shorter or, for purely illustrative images, empty.
- Use natural language. Include a relevant keyword only where it genuinely describes the image.
How long should alt text be?
No standard sets a limit. HTML, WCAG, and Google all ask for useful, concise text. The often-quoted figure of 125 characters is a rule of thumb, not a requirement. In practice, one sentence is usually enough. If you need a paragraph, the information probably belongs in the page text where everyone can read it.
Weak and useful alt text: examples
| Image and context | Weak alt text | Useful alt text |
|---|---|---|
| Product photo on a shoe page | alt="shoes running shoes best running shoes buy" | alt="Trail runner in olive green, side view with lugged sole" |
| Company logo linking to the homepage | alt="logo" | alt="Acme Outdoor home" |
| Line chart in a report | alt="chart" | alt="Line chart: organic clicks doubled between March and June" plus the data in a table |
| Decorative leaf illustration | alt="green leaf nature eco" | alt="" |
| Screenshot of a settings dialog in a tutorial | alt="screenshot" | alt="Settings dialog with the Indexing option switched on" |
Precision, not length, makes the difference.
Why the same image needs different alt text
Many content management systems store one alt text per media library item and insert it wherever the file is used. That is convenient, and it is a quiet source of bad alt text. A team photo described as "Our support team at the 2026 offsite" is accurate on the About page. On a careers page about remote work, the point of the image might be different.
Treat the library value as a default and review it in context. For galleries, make sure each image gets its own description. Ten product images all labeled with the product name tell a screen-reader user nothing about the differences between them.
Alt text, title, caption, filename, and aria-label
These are often confused, and they do different jobs.
altis the text alternative. It is the field assistive technology and search engines rely on.titleshows a tooltip on hover in many browsers. It is not read consistently by screen readers and is not a substitute for alt.- Caption (
<figcaption>) is visible to everyone. It adds context, credit, or interpretation and can complement the alt. - Filename gives Google a weak hint.
olive-trail-runner-side.webpis better thanIMG_4821.webp, but it is no replacement for alt text. aria-labelcan name elements that are not<img>, such as an inline SVG withrole="img". Google's image documentation centers on<img>withalt, so use that pattern for images you want found in search.
Special cases
CSS background images. Google does not index images that are set only in CSS. They also cannot carry alt text. Use them for decoration, and use <img> for anything that carries meaning.
Inline SVG. Give a meaningful inline SVG role="img" and an accessible name through <title> or aria-label. Hide decorative SVGs from assistive technology with aria-hidden="true".
JavaScript-injected images. If a script adds images or alt attributes after load, what counts is the rendered HTML. Test it with the URL Inspection tool, and read up on server-side rendering if critical content depends on client-side code.
Responsive images. One alt covers every srcset candidate. If <picture> serves a different crop on mobile, check that the alt fits each version (see responsive design).
AI-generated alt text. Several CMSs and plugins now suggest alt text automatically. Treat those suggestions as drafts. A model describes what it sees. It does not know why the image is on your page.
How to audit alt text
- Crawl the site and list every
<img>,<input type="image">, and<area>, using the rendered HTML. - Separate images with a missing
altattribute from images withalt="". - Fix every missing attribute first. Each one is a definite error.
- Sample the empty ones. Confirm that they really are decorative, especially large images near the top of the page.
- Review filled alt text on important templates: product pages, category pages, guides.
- Look for duplicates across galleries, keyword lists, filenames used as alt text, and "image of" prefixes.
- Check linked images separately. Their alt text must describe the destination.
- Run an automated accessibility check such as Lighthouse, then test a key page with a real screen reader.
- Re-crawl after the fix and confirm that the template change reached every affected page.
Automated tools find missing attributes reliably. Only a person can judge whether the text is accurate and useful.
Common mistakes
- leaving the
altattribute out instead of writingalt=""for decoration - stuffing keywords or keyword variants into alt text
- using the filename, product SKU, or "image" as alt text
- giving every image in a gallery the same alt text
- describing the logo instead of the link destination in a linked logo
- adding alt text to decorative images, which makes screen-reader users listen to noise
- putting important information only inside an image, without text on the page
- trusting automatically generated alt text without review
- setting meaningful images as CSS backgrounds
The Crawl Foundry perspective
Alt text problems are usually template problems. One missing attribute in a product card template repeats across thousands of URLs. That is why a crawl is the right first step. Crawl Foundry's Site Audit uses its own crawler and checks the rendered HTML, which is the version that counts when scripts add or change images. Crawl history lets you compare runs and confirm that a template fix actually shipped.
The Site Audit is a paid data action, and you see the price before it starts. It runs the official Lighthouse runner on our own servers as part of the audit, and the Lighthouse measurement itself costs you nothing extra. What no crawler can do is decide what an image means on your page. Choosing between a precise description and an empty attribute stays an editorial decision.
FAQ
Does alt text help SEO?
Yes, within limits. Google uses alt text to understand images and to rank them in Google Images, and it treats the alt text of linked images as anchor text. It is not a shortcut to higher web rankings, and keyword-stuffed alt text can hurt.
Should every image have alt text?
Every <img> should have an alt attribute. Informative and functional images need descriptive text. Decorative images need an empty attribute, alt="", so assistive technology skips them.
What is the difference between alt text and a caption?
A caption is visible to all readers and adds context. Alt text replaces the image for people who cannot see it. A caption can make a long alt unnecessary, but it does not replace the attribute.
Related terms
- Image optimization
- On-page SEO
- Off-page SEO
- Title tag
- Header tags
- Lighthouse
- Core Web Vitals
- Page speed
- JavaScript rendering SEO
- Video SEO
- Mobile SEO
Review sources
Why It Matters for SEO
Alt text decides whether people who cannot see an image still get its information, and it gives search engines an explicit statement about what the image means on the page.
Common questions
What is Alt Text?
Alt text is the text alternative in an image's HTML alt attribute. It tells screen-reader users and search engines what an image contributes to the page, and it replaces the image when the file cannot load.
Why does Alt Text matter for SEO?
Alt text decides whether people who cannot see an image still get its information, and it gives search engines an explicit statement about what the image means on the page.
Reviewed by
Crawl Foundry Team
Editorial TeamThe Crawl Foundry editorial team.
Check the image markup your pages actually ship
Crawl Foundry's Site Audit crawls your site with its own crawler and reads the rendered HTML, so you review the alt attributes users and search engines really receive.