alt text
Alt text: what to write, when to write nothing, and why empty is not missing
How to write alt text that works for screen readers and search, the difference between empty and missing alt, and the decorative image rule.

Alt text is the most written about small feature in web development and it is still routinely wrong, usually in one of two directions: every image described at length including the ones that mean nothing, or half the images with no attribute at all.
The distinction that resolves most of it is the one most guides skip.
Empty alt and missing alt are opposites
<!-- Decorative. Announces nothing. Correct. -->
<img src="divider.svg" alt="">
<!-- Missing. The screen reader falls back to the filename. -->
<img src="IMG_20240817_final_v3.jpg">
An empty alt is an instruction: skip this, it carries no information. A missing alt is an absence, and assistive technology handles it by announcing whatever it has, which is generally a filename nobody wrote for a human.
This is why “add alt text to every image” is bad advice in its literal form. The correct rule is that every image needs an alt attribute, and for a decorative image the right value is empty. This is not a convention somebody invented for SEO: the HTML specification’s requirements for text alternatives set it out case by case, and the W3C publish an alt decision tree that walks you to the right answer in about six questions.
Our engine checks these separately for exactly this reason: whether alt attributes are present at all, and whether coverage across the page is reasonable. Passing the first and failing the second is common, and it usually means somebody ran a bulk fix that added alt="" everywhere including on images that carry real information.
What to actually write
The test is simple: if the image vanished, what would the reader lose? Write that.
- A photo illustrating a point. Describe what it shows, in the context of why it is there.
Two engineers reviewing a deployment dashboardbeatsoffice photoand beatsengineers, dashboard, devops, monitoring, software. - A chart or a graph. Give the finding, not the format.
Bar chart showing canonical target failures at 35 percent, the highest of any checkis useful.Bar chartis not. If the underlying numbers matter, put them in a table or in the text as well, because alt text is a poor place to hide data. Every cover image on this site is written that way, including the one at the top of this page, and it is the one alt attribute per post that gets argued about. - A screenshot of an interface. Describe what is being demonstrated.
Structured data checker reporting a malformed JSON-LD blockrather thanscreenshot of our tool. - A logo. The organisation name. If it links somewhere, describe the destination:
Example Co home. - An icon next to text that already says the word. Empty. The word is already there and announcing it twice is noise.
- A product photo. What the product is and any variant the image is showing, since that is often the only place colour or configuration appears.
Two things to avoid. Do not begin with “image of” or “picture of”: the screen reader already announced that it is an image, so you are adding a word to every image on the site. And do not repeat the caption verbatim when there is one, because it will be read twice.
The functional image case
When an image is the control, the alt text describes the action rather than the picture.
<!-- Wrong: describes the glyph -->
<a href="/cart/"><img src="cart.svg" alt="shopping cart icon"></a>
<!-- Right: describes what happens -->
<a href="/cart/"><img src="cart.svg" alt="View your cart"></a>
Same for an image inside a button, and same for a logo that links home. The user does not need to know what the icon looks like, they need to know where it goes.
Where alt text sits in the wider picture
Honestly: low. In our audit of professional marketing sites, alt coverage failed on a small minority, and it carries one of the lower weights in our own scoring. It is not the constraint on any site with a real problem. If you are deciding what to spend an afternoon on, the failure rates say to start elsewhere.
It stays on every checklist anyway for two reasons that have nothing to do with rankings. It is the difference between a usable page and an unusable one for people who use screen readers, which is a WCAG level A requirement and enough on its own. And it is one of the few SEO tasks where the correct action for accessibility and the correct action for search are identical, so there is no trade to reason about: Google’s image best practices ask for the same thing the screen reader does, which is a description of what the image shows.
Write it for the person who cannot see the image. The rest follows.
Checking it across a whole site
Doing this by hand does not scale past a page or two, and it does not need to: this is template shaped work like most technical SEO. Find the templates that emit images without an attribute, fix those, and the long tail resolves itself.
Our alt text checker reports missing attributes and coverage on a live URL and distinguishes empty from missing, which is the distinction that decides whether you have a bug or a decision. The technical SEO checklist puts this in order against everything else worth checking, and the free audit runs it alongside the other thirty-five checks so you can see where it actually ranks among your problems.
One neighbouring thing worth doing at the same time. If your images carry meaning that the page depends on, the image property in your structured data should point at them too, because that is the other place a machine looks for what an image is.
Sources
Read on 15 August 2026.
- WHATWG, requirements for providing text to act as an alternative for images, for the normative rules, case by case, including the decorative case.
- W3C WAI, an alt decision tree, for the shortest correct route to a value.
- W3C, understanding WCAG 2.2 success criterion 1.1.1, non-text content, for the accessibility requirement itself.
- Google, Google Images best practices, for what search does with the attribute and its position on keyword stuffing.
Questions people ask
What is alt text?
The text alternative for an image, written in the alt attribute. It is what a screen reader announces in place of the image, what a browser shows when the image fails to load, and what anything reading the page without seeing it uses to understand what the image contributed. It is an accessibility feature first and an SEO one as a consequence.
What is the difference between empty alt and missing alt?
They are opposites. An empty alt, written as alt="", tells a screen reader the image is decorative and should be skipped silently. A missing alt attribute tells it nothing, so it falls back to announcing the filename, which is usually a meaningless string. Empty alt is a decision. Missing alt is an omission.
How long should alt text be?
Long enough to convey what the image contributes and no longer. Most useful alt text lands between about five and fifteen words. If you genuinely need a paragraph, the information belongs in the page text where everyone can read it, with the image supporting it rather than carrying it.
Does alt text help SEO?
Modestly and genuinely. It is how image search understands what an image shows, and it contributes to what the page is understood to be about. It carries low weight in our own scoring, and the reason to write it well is that it is the accessible thing to do and the SEO benefit follows for free.
Should I put keywords in alt text?
Only where they are the accurate description. Alt text stuffed with keywords is unhelpful to the person it exists for, which is somebody who cannot see the image, and it is trivially detectable. Describe the image. If the keyword is what the image shows, it will appear naturally.
Do decorative images need alt text?
They need an empty alt attribute, not a missing one, and not a description. A background flourish, a divider, or an icon sitting next to a label that already says the same word all add nothing when announced. Writing alt="decorative swirl" makes the page worse for screen reader users, not better.
Related guides
- On page SEO: the checklist barely changed, and the weighting didTitles and meta descriptions are mostly fine on professional sites. What fails is heading order, extractable passages and attribution. Measured on 88 homepages.
- SEO tips ranked by how often the thing is actually brokenMost SEO tips are opinions in no order. These are ordered by measured failure rates across our own audits of professional marketing sites.
- Product feed vs Product schema: two copies of the truth that must agreeWhat a Merchant Center feed and Product structured data each do, where they drift, and how to audit both without guessing.