← Back to blog
On-Page SEO

Image Alt Text: What It's For, and How to Write It Right

Alt text does two jobs at once: it's what a screen reader announces instead of the image, and one of the few signals Google has for what an image actually shows. Here's how to get both right.

By Rajhussain Kanani11 min read

Alt text does two jobs at once

The alt attribute on an <img> tag exists for one reason: to describe the image to whoever or whatever can't see it. That covers two real audiences — a screen reader announcing the page to a visually impaired visitor, and a search engine that reads the text around an image well but still has to work out what the pixels show. It also quietly does a third job: if the image fails to load, the alt text is what shows in its place instead of a broken-image icon.

What makes alt text good versus useless

Good alt text describes what's actually relevant about the image in plain language — "golden retriever puppy sitting in autumn leaves," not "image of a dog." The "image of" prefix is redundant; screen readers already announce that it's an image. For purely decorative images, the correct move is an empty alt="", not a missing attribute: an empty alt tells a screen reader to skip the image silently, while a missing one often makes it announce the filename instead.

Four images, before and after

Alt text mistakes rarely show up in isolation — a page with one bad example usually has several. Here are four common patterns together, all wrong in different ways:

<img src="img_4821.jpg">
<img src="banner.png" alt="image">
<img src="shoes.jpg" alt="running shoes buy cheap running shoes sale best price">
<img src="divider.png" alt="decorative line divider graphic">

In order: no alt attribute at all (many screen readers fall back to the filename, "img 4821 jpg"); a generic placeholder that describes nothing; a keyword-stuffed string written for a search engine instead of a person; and a decorative divider given a description when it should be silent. Fixed:

<img src="img_4821.jpg" alt="Golden retriever puppy sitting in autumn leaves">
<img src="banner.png" alt="TrailFoot spring sale banner, 20% off all trail shoes">
<img src="shoes.jpg" alt="Blue and orange trail running shoe, side profile">
<img src="divider.png" alt="">

Notice the last one didn't get a more detailed description — it got emptied out entirely. alt="" is the correct fix for a purely decorative image, not a cop-out: writing a description for a divider line would make the experience worse, not more complete.

Paste a URL into CheckSEO's Alt Text Checker to see every <img> on a page and which ones have no alt attribute or an empty one — no signup.

Check your page for missing alt text

Decide by the image's job, not by what it shows

Most weak alt text comes from starting with the picture ("what does this show?") instead of its job on the page ("what is this doing here?"). The same photo can deserve a sentence in one place and silence in another. Work down these five questions and stop at the first yes:

  1. Would a reader miss anything if the image vanished? If not, it is decoration — a texture, a divider, or an icon beside text that says the same thing. Use alt="", or move it into CSS so it never needs an alt at all.
  2. Is it the only thing inside a link or a button? Then it is functional. Write the destination or the action ("Search," "See membership pricing"), not the artwork.
  3. Does it contain words the reader needs? Repeat them in the alt, word for word. Better still, replace the image with real text styled to look the same.
  4. Is it a chart, diagram, map or infographic? Use a short alt that says what it is and its main takeaway, and put the detail in visible text or a table beside it.
  5. Anything else is informative. Write one plain sentence saying what the image shows that matters on this page.

Function beats content, so a photo inside a link is described by where the link goes. Context matters too: a croissant photo might read "Cross-section of a baked croissant showing honeycomb layers" on a recipe page, "Butter croissant" on a menu, and nothing at all in a banner beside the headline "Fresh croissants every morning."

Ten examples, one for each situation

These use two invented sites: TrailFoot, a trail-shoe shop, and Fernhill Bakery. Each pair is the smallest change that fixes the problem.

Informative images

<!-- 1. Product photo (TrailFoot, a trail-shoe shop) -->
<!-- before: true, but it could describe any shoe -->
<img src="ridgeline-gtx-side.jpg" alt="shoe">
<!-- after: what a buyer who cannot see it needs to know -->
<img src="ridgeline-gtx-side.jpg" alt="Ridgeline GTX trail shoe in slate blue, side view">

<!-- 2. Team photo (Fernhill Bakery, About page) -->
<!-- before -->
<img src="maya-okafor.jpg" alt="photo">
<!-- after: who it is and what they are doing, because the page is about the people -->
<img src="maya-okafor.jpg" alt="Maya Okafor, head baker at Fernhill Bakery, shaping loaves">

Decorative images

<!-- 3. Icon beside a text label (Fernhill Bakery, footer) -->
<!-- before: a screen reader announces "clock icon" and then the hours -->
<img src="clock.svg" alt="clock icon"> Open 7am to 3pm
<!-- after: the text already says everything, so the icon stays silent -->
<img src="clock.svg" alt=""> Open 7am to 3pm

A purely visual image can also live in a CSS background-image, which needs no alt text. The flip side is a rule worth remembering: if you would need to describe it, it should not be a CSS background.

Functional images: links and buttons

<!-- 4. Logo that links home -->
<!-- before -->
<a href="/"><img src="logo.svg" alt="logo"></a>
<!-- after -->
<a href="/"><img src="logo.svg" alt="Fernhill Bakery"></a>

<!-- 5. Icon-only search button -->
<!-- before: describes the picture -->
<button type="submit"><img src="magnifier.svg" alt="magnifying glass"></button>
<!-- after: describes the action -->
<button type="submit"><img src="magnifier.svg" alt="Search"></button>

<!-- 6. Product card where the image and the headline link to the same page -->
<!-- before: two links to one place, so the destination is announced twice -->
<a href="/shoes/ridgeline-gtx"><img src="ridgeline-gtx-side.jpg" alt="Ridgeline GTX trail shoe"></a>
<a href="/shoes/ridgeline-gtx">Ridgeline GTX trail shoe</a>
<!-- after: one link, and the visible text names it, so the image stays silent -->
<a href="/shoes/ridgeline-gtx">
  <img src="ridgeline-gtx-side.jpg" alt="">
  Ridgeline GTX trail shoe
</a>

<!-- 7. Promo image that is the only content of its link -->
<!-- before: no alt, so the link has no name at all -->
<a href="/pricing"><img src="pricing-promo.png"></a>
<!-- after: names the destination -->
<a href="/pricing"><img src="pricing-promo.png" alt="See TrailFoot membership pricing"></a>

When an image does a control's job, describe the action, not the picture. "Magnifying glass" says what the image looks like; "Search" says what happens if you activate it. WCAG asks the same of controls: a name that describes their purpose. It is a common blind spot even on sites that get content-image alt text right. For a logo that links home, the company name ("Fernhill Bakery") is enough: the screen reader announces the link separately, so skip "logo" and "link to homepage." Some teams add "home"; either is fine if you are consistent.

Text in images, charts and SVG icons

<!-- 8. Banner with the message baked into the image -->
<!-- before -->
<img src="sale.png" alt="sale banner">
<!-- after: the words in the image, word for word -->
<img src="sale.png" alt="Autumn sale: 20% off all trail shoes until 31 October">

<!-- 9. Chart -->
<!-- before: the alt tries to carry every data point -->
<img src="orders.png" alt="Jan 310 Feb 355 Mar 402 Apr 468 May 551 Jun 640 orders per month">
<!-- after: short alt gives the takeaway, visible text carries the detail -->
<figure>
  <img src="orders.png" alt="Line chart: orders per month rise steadily from January to June, roughly doubling">
  <figcaption>First-half order volume. The exact monthly figures are in the table below.</figcaption>
</figure>

<!-- 10. Inline SVG icon (an alt checker never sees it, but screen readers do) -->
<!-- before: a status icon with no name -->
<svg viewBox="0 0 16 16"><path d="M3 8l3 3 7-7"/></svg>
<!-- after: named, because nothing beside it says "In stock" -->
<svg viewBox="0 0 16 16" role="img" aria-label="In stock"><path d="M3 8l3 3 7-7"/></svg>

A short alt can't carry a twelve-point chart, and trying produces something too long to listen to and still incomplete. Keep the alt to what the image is and its takeaway, and put the numbers in a caption, a summary paragraph or an adjacent table. That visible text serves screen reader users and gives Google real, indexable words, where a static chart on its own leaves search engines little beyond its alt text.

How Google uses alt text, and what keyword stuffing looks like

Google doesn't read a picture the way a person does. Its own image guidance says it combines alt text with computer vision and the content of the page to work out what an image is about. Your alt text sits beside other signals you control: the heading above the image, the paragraph next to it, the caption, the file name. Three consequences follow.

  • Context counts as much as the attribute. An image beside a paragraph on the same subject has its meaning confirmed twice; a keyword-heavy alt on an image the page never discusses confirms nothing.
  • On a linked image, the alt works as the link's anchor text. Google's image guidance says so, which is why a missing alt on a banner link wastes a link as well as failing an accessibility check. See the internal linking audit guide for why anchor text matters.
  • Alt text won't rescue a thin page. It helps an image be understood, which matters most where the image is part of the answer, like products and recipes. It is not a ranking lever on its own.

Keyword stuffing in alt text takes three forms: the target phrase repeated, a list of synonyms or locations appended, or the same keyword stamped on every image on the page. It is the image version of keyword stuffing in body copy, and Google's guidance warns it makes for a poor experience and can look like spam.

<!-- stuffed: repeats the phrase, adds a keyword list, reads like a tag cloud -->
<img src="ridgeline-gtx-trail.jpg" alt="trail running shoes best trail running shoes cheap trail running shoes buy online UK">
<!-- natural: says what is in the picture; the phrase appears once because it is accurate -->
<img src="ridgeline-gtx-trail.jpg" alt="Pair of grey trail running shoes on a rocky path">

A quick test: read the alt aloud to someone on the phone who can't see the picture. If you would feel silly saying it, rewrite it. If the image doesn't show the thing your keyword names, the keyword doesn't belong in it.

Treat length as a guideline. Neither Google nor WCAG sets a character limit. The common rule of thumb is under about 125 characters, a habit rooted in how some screen readers handled long text, and most good alt text is five to fifteen words. If you need more than a sentence, you probably have a complex image, not an alt text problem: put the detail in visible text.

Accessibility first: what WCAG actually asks for

For someone using a screen reader, the alt text is the image. WCAG Success Criterion 1.1.1, Non-text Content, asks for a text alternative that serves the equivalent purpose for images that carry information. Pure decoration is an exception, but it has to be implemented so assistive technology can ignore it, which in HTML means alt="". It is a Level A criterion, the baseline that every higher level builds on (including AA, which most accessibility policies aim for), and it reads the same in WCAG 2.1 and 2.2.

Whether a specific law applies to you depends on where you operate and what you sell, and this is not legal advice. WCAG is the yardstick most accessibility laws, procurement rules and audits point to, and missing text alternatives are among the most commonly reported failures in automated scans. Those tools, ours included, can confirm only that the attribute exists and isn't empty; a person has to judge whether the text is right. Treat a clean report as "nothing is missing," not "everything is good."

Heading structure sits in the same spot: both a screen reader and a search engine read it directly. Audit the two together, since a page with strong alt text and a broken heading outline is still only half fixed for either audience.

What CheckSEO's Alt Text Checker actually reports

Enter one URL and the checker reads every <img> element in the page's HTML, in document order, and sorts each into one of three states by its alt attribute:

  • Non-empty alt: ticked, with the text shown, and listed under Valid. Present, though not necessarily good.
  • alt="": a warning marker reading "Empty alt attribute," listed under Issues. Correct if the image is decorative, a gap if it isn't.
  • No alt attribute: an error marker reading "Missing alt attribute," listed under Issues. Always worth fixing.

The score is the share of images with a non-empty alt, rounded, or 100 for a page with no images. The "Missing/Empty" tile adds the last two states together. The catch is that a deliberate alt="" does not count as "with alt." Take a page with 20 images: 13 with text, 3 with an empty alt, 4 with no attribute. It scores 65. Fix the four (three get real descriptions, one is decorative and gets an empty alt) and it scores 80, the correct ceiling for that page. Read the warning rows as "confirm this is decorative," not as errors to chase.

What the checker does not do is just as useful to know:

  • It doesn't judge quality. alt="image", alt="img_4821.jpg" and a pile of keywords all land under Valid, because the test is only whether the attribute is non-empty.
  • It reads <img> elements and their alt attribute only. CSS background images, inline SVG and <input type="image"> never appear, and aria-label, aria-hidden or role="presentation" don't change a row. An <img> with neither src nor data-src is skipped. An image you can see but isn't listed is probably one of these.
  • It counts tags, not files. The same logo in the header and the footer is two rows, which is exactly what makes template-level problems easy to spot. It also checks one page at a time.

Three neighboring tools answer different questions. The Accessibility Quick Check flags only a missing alt attribute, not an empty one, and adds a check for linked images: a link or button with no text, no ARIA label and no image with a non-empty alt is reported as an empty link. The Broken Image Checker asks whether each file loads, which matters because a broken image falls back to showing its alt text. The Full Site Audit includes the alt check among its others and links to the Alt Text Checker for the image-by-image list.

Turn the list into a fix plan

A long list of flagged images feels like a long list of jobs. Usually it is a handful of jobs repeated.

1

Run it on one page per template, not one page per site

Check the homepage, a category or listing page, and a product or article page. Pages built from the same template share their components, so one run per template finds most of what a full crawl would.

2

Group the Issues rows by pattern

Switch the filter to Issues and read the file paths. Rows that share a folder or filename, or that come from the header, footer, navigation or a card grid, are one component rendering many times: a developer fix. Rows that are all different photos inside a page body are an editor fix.

3

Triage each distinct row, then fix it at the source

Run each row through the decision tree: decorative gets alt="", linked images get the destination, informative images get a sentence. Then stop it coming back: make alt a required prop on your own image component, add an alt field to your media library, and fall back to the product title when nobody has written one. A fallback is weaker than a real description, but far better than nothing.

4

Re-run and read the numbers correctly

The goal is zero missing attributes, with every remaining warning row a deliberate decoration. A score below 100 is correct when the empty alts are intentional.

// before: one component, so every card on the page is a flagged row
<img src={product.image} />

// after: one change clears all of them
<img src={product.image} alt={product.imageAlt ?? product.title} />

7 alt text mistakes that undercut both SEO and accessibility

These are the patterns you will see most often in a checker's results.

1

Missing alt attribute entirely

The single most common finding on any audit. Many screen readers fall back to reading the file name or the URL, which is rarely useful to anyone, and search engines get nothing to go on beyond the surroundings.

2

File names, placeholder words and 'image of'

"img_4821.jpg," "photo" and "banner" technically fill the attribute but describe nothing, and they pass a presence check without helping anyone. A prefix like "image of" is spoken twice, because screen readers already announce an image. Start with the subject.

3

Keyword-stuffed alt text

Writing "running shoes buy cheap running shoes sale" instead of a description is the image equivalent of the keyword stuffing that hurts written content, and it reads as spam to a screen reader user and to Google alike.

4

The same alt text on every image

A template that stamps the page title or brand name onto every image gives screen reader users a row of identical announcements they can't tell apart, and gives search engines nothing image-specific. Each informative image should say something only that image can.

5

Describing decorative icons, or leaving them off

An icon beside a text label that says the same thing should have alt="". Writing "clock icon" makes the listener hear it twice, and omitting the attribute forces assistive tech to guess whether it was an oversight or intentional.

6

Missing or empty alt on an image that is the only content of a link

The link has no name, so a screen reader often reads out the URL or file name instead, and the anchor text is thrown away. In CheckSEO's Anchor Text Analyzer, an image link with a good alt appears as [image: your alt text]; with an empty or missing alt it shows as (empty) and is flagged.

7

Alt text that just repeats the caption

If a visible caption already says "Q3 revenue chart," identical alt text adds nothing — use the alt text to describe what the image actually shows instead (the trend, the key numbers) that the caption doesn't.

Check your own page

CheckSEO's Alt Text Checker lists every image on a page with its alt status in one pass, so you're not opening dev tools on every image by hand. Pair it with the Accessibility Quick Check for image links with no name, and see the full SEO audit checklist for where alt text sits in a wider review.

Sources

Frequently asked questions

What is image alt text?

A short text description added to an image's HTML attribute that stands in for the image when it can't be seen — read aloud by screen readers, shown if the image fails to load, and used by search engines that can't otherwise interpret what's in a picture.

Is image alt text important for SEO?

Yes, though indirectly — it's the main signal Google has for what an image depicts, which affects image search visibility and gives the page slightly more relevant text for search engines to read.

When should alt text not be used for an image?

For purely decorative images that add nothing informational — a background pattern or a divider graphic — use an empty alt attribute (alt="") rather than skipping it entirely. That tells a screen reader to skip the image silently instead of announcing a meaningless filename.

Is alt text legally required?

In many jurisdictions, yes in practice — accessibility laws like the ADA (US) and similar regulations elsewhere have been applied to websites, and missing alt text is a frequent finding in accessibility audits and complaints. The WCAG guidelines that many of these laws refer to require a text alternative for meaningful images; this is general information, not legal advice.

How long should alt text be for images?

Long enough to describe what's actually relevant, a common rule of thumb is to stay under about 125 characters. There is no official limit, and a concise, accurate description serves both screen-reader users and search engines.

Check your own site with the Alt Text Checker.

Open Alt Text Checker

Want every check at once?

The free Full Audit runs 33 checks on any URL, most of them in seconds. Add your email afterwards and we send a detailed one-page report; the full-site report covers up to 1,000 pages.

More from the blog

We use cookies to analyze site usage and improve your experience. You can decline non-essential cookies. Privacy Policy