Guide
Image alt text: examples, length, SEO and how to check it
Alt text is a short description of an image, written into the page's HTML. A screen reader reads it out to a visitor who can't see the image. A browser shows it when the image fails to load, and search engines use it to understand what the image shows. Missing alt text is one of the most common accessibility failures on the web, and one of the cheapest to fix. This page shows what to write, with examples, and how to check whether your images have it.
What alt text is
Alt text lives in the alt attribute of an image tag: <img src="red-wool-scarf.jpg" alt="Red wool scarf with fringed ends">. People often call it an alt tag, but it's an attribute of the img tag. In WordPress, Shopify, Wix and Squarespace you type it into a field next to the image, and the platform writes the attribute for you.
The rule behind it is WCAG 1.1.1, Non-text Content, at level A. Every image that carries information needs a text alternative that does the same job, and decorative images should be hidden from screen readers. In February 2026, WebAIM tested the home pages of the top million websites and found missing alt text on 53.1% of them.
How to decide what to write
The W3C's alt decision tree comes down to four questions. Ask them in order and stop at the first yes.
- Does the image contain text? Put the same text in the alt. If the same words are already next to the image, use an empty alt instead.
- Is the image a link or a button? Say where it goes or what it does. A magnifying glass that opens the search box gets
alt="Search". - Does it add information to the page? Describe that information in a few words. For a chart or a map, keep the alt short and put the details in the page text.
- Is it only there for looks? Use an empty alt,
alt="", so screen readers skip it.
The same photo can need different alt text on different pages. A photo of your shop front is decoration on a post about your opening hours. On a page that tells visitors how to find you, it's information. Write for the reason the image is on that page.
Alt text examples
| Image | Where it is | Alt text |
|---|---|---|
| Product photo | A shop's product page | alt="Red wool scarf with fringed ends, folded" |
| Second product photo | The same product gallery | alt="Close up of the scarf's knit and fringe" |
| Logo | Top of every page, links to the home page | alt="Hill Street Bakery" |
| Icon button | A magnifying glass that opens search | alt="Search" |
| Banner with words on it | "20% off all scarves" written on the image | alt="20% off all scarves" |
| Chart | Sales by month, with a table below it | alt="Bar chart of sales by month in 2026, details in the table below" |
| Team photo | The about page | alt="Our five bakers in the kitchen" |
| Phone icon | Next to the words "Call us" | alt="" |
| Divider or background pattern | Between two sections | alt="" |
The bakery is made up. Here are the mistakes that come up again and again:
- File names, such as
alt="IMG_4032.jpg"oralt="scarf-final-2". They tell the visitor nothing. - "Image of" or "picture of" at the start. Screen readers already say that it's an image.
- A list of keywords, such as
alt="scarf wool scarf red scarf winter scarf". - The same alt on every photo in a gallery. Say what each one shows: the back, the label, the fabric up close.
- How a link image looks instead of where it goes, such as
alt="Blue arrow"on a link to the next page.
Alt text and SEO
Google's image SEO guide says it uses alt text, together with computer vision and the text on the page, to understand what an image shows. When an image is a link, Google treats its alt text like the text of the link. The same guide warns that filling alt attributes with keywords can make a site look like spam.
So the advice for search and for accessibility is the same. Describe the image in plain words, and use a keyword only where it really describes the image. Google's own example: alt="puppy" is fine, alt="Dalmatian puppy playing fetch" is better, and a long string of dog words is bad. A file name that describes the image helps too, such as red-wool-scarf.jpg rather than IMG_4032.jpg.
How long should alt text be?
WCAG sets no length limit, and neither does Google. You'll often read that alt text must stay under 125 characters. That number gets passed from guide to guide, but no standard sets it, and current screen readers read the whole text.
Short is still better, because a visitor has to listen to every word. A few words is usually enough, and it's rarely more than a sentence or two. If an image holds more than that, such as a chart, a map or an infographic, keep the alt short and put the full details in the page text, where everyone can read them.
Decorative images
Some images add nothing a visitor needs: a divider, a background pattern, a stock photo under a heading that says the same thing. Give them an empty alt, alt="". The attribute must be there and be empty. When it's missing altogether, some screen readers read out the file name instead.
An icon next to its own label is decorative too. A phone icon next to the words "Call us" needs alt="", or the visitor hears "phone, Call us". Screen readers already skip images that CSS adds as backgrounds. So don't put information only in a background image, because a screen reader user won't get it.
How to check if an image has alt text
- Inspect it in the browser. Right-click the image and choose Inspect. The developer tools open on the img tag. If there's no alt attribute, the image fails. If it reads
alt="", make sure the image really is decorative. - Run a scan. The free one-page check counts the images on a page that have no alt attribute and shows where the first few are.
- On WordPress, check the media library. Click an image, and the Alternative Text field is in the attachment details. Our free WordPress plugin lists the newest images in the library that have no alt text, so you don't have to open them one by one. An image already placed in a post keeps the alt text it had when you placed it, so check the post as well.
- Listen with a screen reader. VoiceOver is built into Mac and iPhone, and NVDA is free for Windows. Move through the page and hear what each image says. This is the only check that tells you whether the words make sense.
A machine can tell you that an image has no alt attribute. It can't tell you whether the words fit the image. Our audits check both. The automated sweep finds the images with no alt, and a second pass reads the alt text on the page and flags file names, filler words like "photo", and images marked as decorative that seem to carry information. The ADA compliance checklist covers the other checks you can run in a browser.
Common questions
Does every image need alt text?
Every img element needs an alt attribute. Images that carry information need words in it, and decorative images need it empty.
Is missing alt text an ADA violation?
The ADA itself says nothing about alt text. US courts and the Department of Justice reference WCAG 2.1 AA for websites, and WCAG 1.1.1 asks for alt text. It's also one of the easiest failures for anyone to find, since a free scan shows it in seconds. If you have received a demand letter, read our 72-hour guide and talk to a lawyer.
What is the difference between alt text and a title attribute?
Alt text replaces the image for people who can't see it. A title attribute shows a small tooltip when a mouse rests on the image. Screen readers don't read it reliably, and phone and keyboard users never see the tooltip, so it can't stand in for alt text.
What alt text should a linked image have?
Say where the link goes. A logo that links to the home page gets your business name, and a social media icon gets the network's name, such as "Instagram". If the image is the only thing in the link, an empty alt leaves the link with no name at all.
Should alt text include keywords?
Only when they describe the image. A photo of a red wool scarf can say "red wool scarf", because that's what it shows. Words that don't describe the image make the alt text worse for the visitor, and Google may treat them as spam.
Can a tool write my alt text for me?
Tools that write alt text can describe what's in a picture. They don't know why it's on your page, and that's what the alt text should say. Use them for a first draft, and read each one before you publish it.