Alt text for SEO: what Google reads, and the four cases where you write nothing

Alt text for SEO is a description written for someone who cannot see the image. Google treats a keyword list there as spam. Four kinds of image take an empty attribute instead, and omitting the attribute means something different again.

Rankings & Citations7 min read2043 views
Alt text for SEO: what Google reads, and the four cases where you write nothing

Alt text for SEO is a description of the image, written for someone who cannot see it. Google reads it to work out what the picture is about, and treats a keyword list in that attribute as spam. Four kinds of image are supposed to carry an empty description instead of a written one, and leaving the attribute off entirely means something different again.

Before you start

You need to be able to edit the <img> markup a page emits, which on a hosted platform is sometimes a media library field rather than HTML. You also need to know which images on the page are content and which are furniture. That second decision does most of the work here, and no tool can make it for you.

Why this attribute is not a keyword field

Google's image SEO documentation, read on 2026-08-26, gives the attribute a specific job and then draws a line under it:

"Google uses alt text along with computer vision algorithms and the contents of the page to understand the subject matter of the image."

Three inputs, and yours is one of them. The same page says what happens when you push: "Avoid filling alt attributes with keywords (also known as keyword stuffing) as it results in a negative user experience and may cause your site to be seen as spam."

There is one case where the text does something extra. Google notes that "alt text in images is useful as anchor text if you decide to use an image as a link" — so an image wrapped in a link is the one place where the description is also carrying link value, and a vague word there costs you twice.

How to write alt text for SEO, in four steps

Describe first, edit second. Every step below is a way of removing something from a sentence you already wrote, which is why the order matters more than any of the individual rules.

  1. Look at the image without the page around it, and say out loud what it shows. That sentence, trimmed, is usually the answer
  2. Check whether the surrounding text already says it. If the caption or the next paragraph names the thing, do not repeat the name — the description should add what the picture adds
  3. Cut it to one clause. Google's own ladder in the same document runs from alt="puppy", which it labels "Better", to alt="Dalmatian puppy playing fetch", which it labels "Best"
  4. Read it back with the image hidden. If the sentence still tells you something, it works. If it reads like a category listing, rewrite it

The HTML standard is blunter about the failure mode. On a chart, it notes that "sales graph" would be inadequate alternative text for a sales graph, and shows the correct version spelling out the numbers the chart contains. Naming the genre of an image is not describing it.

The four cases where the right answer is nothing

An empty attribute and a missing attribute are two different statements. The HTML Living Standard, read on 2026-08-26, treats an omitted attribute as a claim that the image is a key part of the content and that no text could stand in for it. An empty attribute says the opposite: there is nothing here worth reading aloud.

The image isWriteBecause
Content of the pageA describing clauseText has to substitute for it
Decorative, page-specificalt=""Adds no information
Repeating adjacent textalt=""Would be read out twice
Ancillary, no captionalt=""Description adds nothing
A counting pixelalt=""Not an image to a reader
Part of the site designMove it to CSSIt is not document content

That last row is the standard's first preference, not ours: "If an image is decorative but isn't especially page-specific — for example an image that forms part of a site-wide design scheme — the image should be specified in the site's CSS, not in the markup of the document."

One exception is worth memorising because it catches people who have just learned the rule. If an ancillary image has a caption, the attribute must not be empty. The standard says an empty one "would be quite confusing for non-visual readers", because the caption announces a picture that then has nothing to announce.

The deliverable: a six-line check before you publish

Run this down the list of images on the page you are about to ship. It takes about a minute per page and catches everything above.

CheckPass looks like
Attribute presentEvery <img> has one
Content images describedA clause, not a noun
Decoration emptiedalt="", not omitted
Captioned imagesNever empty
Linked imagesDescribes the destination
No repeated phraseSame words never twice

And the command that finds the images with no attribute at all, which is the only part a machine can do for you:

# Every img on the page that has no alt attribute
curl -sL --compressed -A 'Mozilla/5.0' https://example.com/page \
  | grep -o '<img[^>]*>' | grep -v 'alt=' 

Two things this cannot check. It reads the raw HTML, so images inserted by a script will not appear; and it cannot tell a good description from a bad one, which is the part that matters.

What going wrong looks like

The most common failure is not a missing attribute. Our measurement of alt text across 27 homepages found that missing attributes are rare and empty ones are everywhere, which means most teams have already installed a linter and satisfied it with an empty string. That passes the check and describes nothing.

The second failure is the keyword list, and it is the one with a stated consequence. Google's documentation shows an example of an attribute stuffed with forty words of dog synonyms and labels it "Bad", with the spam warning attached in the same section.

The third is the copied caption. If the figure caption already reads "Dalmatian puppy playing fetch" and the attribute says the same thing, a screen reader announces the sentence twice. This is not a ranking problem. It is a reading problem, and the standard treats the two as the same problem.

An empty alt attribute is a sentence: this image says nothing the text does not already say. Write it when it is true.

Where this stops being about images

Alt text for SEO does not make an image rank on its own, and it will not rescue a page whose text is thin. Google's documentation is direct that the surrounding page carries most of the weight: "Google extracts information about the subject matter of the image from the content of the page, including captions and image titles. Wherever possible, make sure images are placed near relevant text and on pages that are relevant to the image subject matter."

So the description is a small signal attached to a bigger one. If an image sits in a section that does not discuss it, no wording of the attribute fixes that — the fix is in how to structure content for AI, where the section, not the page, is the unit. For a look at how pages reach engines in the first place, see how QueryWin works.

Common questions

Should I put my keyword in alt text?

Only if the keyword is what the image shows. Google's wording is "uses keywords appropriately and is in context of the content of the page", which rules out inserting a phrase that does not describe the picture. If the honest description happens to contain the phrase, nothing needs adjusting.

How long should alt text be?

No documented limit exists, and one clause is enough for almost everything. The exception is an image that carries data — a chart, a table rendered as a picture — where the standard's own example writes out the numbers, because there is no shorter way to substitute for them.

Is a missing alt attribute worse than an empty one?

They mean different things rather than being ranked. Omitting it claims the image is a key part of the content with no possible substitute; an empty one claims the image adds nothing. Most images that are missing the attribute are neither, which is why the honest fix is usually a description, not a pair of quotes.

What about images loaded by JavaScript?

The attribute still applies, but a client that does not render never sees the element. Google indexes images found in the src attribute of an <img> element and does not index CSS background images, so anything decorative moved into a stylesheet leaves the picture out of image search by design.

Do filenames matter too?

A little. Google calls them "very light clues" and suggests my-new-black-kitten.jpg over IMG00023.JPG. It is worth doing when you are naming a file anyway and not worth a bulk rename, since changing an image URL costs you the cached copy Google already holds.

Part of the QueryWin handbook · Level 2

Alt text for SEO: what Google reads, and the four cases where you write nothing