Alt text examples: how to write it, with 20 worked cases
Good and bad alt text side by side for the images a small business site actually has: product photos, logos, linked images, icons, charts and decoration.
Plain English. Last reviewed 21 November 2026.
What WCAG actually asks
Alt text comes from WCAG success criterion 1.1.1, Non-text Content, at level A. The W3C's Understanding document gives the intent in one line: "to make information conveyed by non-text content accessible through the use of a text alternative." Three parts of it decide most cases:
- An image that conveys information needs a text alternative that serves the same purpose.
- A control, such as an image link or an icon button, "has a name that describes its purpose".
- Pure decoration "is implemented in a way that it can be ignored by assistive technology". On the web, that means
alt="".
The W3C's alt decision tree turns that into five questions. The examples below follow it, one type of image at a time.
20 alt text examples, good and bad
Each row is an image a typical small business site might have. The "weak" column is the kind of thing our free page checker finds on real sites; the "better" column is what to write instead.
| Image | Weak alt | Better alt |
|---|---|---|
| 1. Product photo in a shop | IMG_4032.jpg | Oak chopping board with a juice groove, shown from above |
| 2. Second photo of the same product | Oak chopping board | The same board on its side, showing the hanging hole |
| 3. Team photo on an About page | Image of our team | The four of us outside the studio, laughing at a whiteboard |
| 4. Logo in the header, linking home | logo | Hartley's Bakery home |
| 5. Logo in the footer, not a link | Hartley's Bakery logo | Hartley's Bakery |
| 6. Magnifying glass icon as the only content of a search button | magnifying glass | Search |
| 7. Printer icon as a link | printer | Print this page |
| 8. Facebook icon linking to your page | (missing) | Hartley's Bakery on Facebook |
| 9. Arrow icon next to the words "Read more" | arrow | Empty: alt="" (the words already say it) |
| 10. Blog card image linking to a post, with the title as a link too | Image of bread | Empty: alt="" (the title link names it) |
| 11. Banner with the words "20% off this weekend" | Sale banner | 20% off this weekend |
| 12. Screenshot of a booking form in a how-to post | screenshot | The booking form, with the date picker open on Saturday |
| 13. Bar chart of monthly sales | A bar chart showing sales in January were 1,200, February 1,350... (200 more words) | Sales by month, rising from March to a peak in November. Full figures in the table below. |
| 14. Map showing your shop's location | map | Map: our shop is on Market Street, opposite the library |
| 15. Decorative swirl between sections | swirl divider | Empty: alt="" |
| 16. Stock photo of a laptop on a blog post about tax | Laptop on a desk with a coffee cup and a plant | Empty: alt="", unless the picture tells the reader something |
| 17. Photo with a caption that already describes it | Repeats the caption word for word | Empty: alt="", or a short note the caption leaves out |
| 18. Before-and-after photo of a kitchen fit | kitchen | Before: dark wooden cupboards and a tiled floor. After: white units and oak worktops |
| 19. Award badge | badge | The words on the badge, such as "Winner, Best Independent Bakery 2025" |
| 20. Headshot on a staff page, name shown beneath it | Photo of Sarah Jones | Empty: alt="", or "Sarah smiling in the workshop" if the photo adds something |
The names, figures and awards in the table are examples. Use your own, and never describe an award or a claim in alt text that the page itself does not make.
Product photos and photographs
For a simple photograph that adds meaning, the decision tree says to use "a brief description". Describe what a customer would want to know from the picture: the thing, and anything the photo shows that the text does not, such as colour, size or how it is used. Context decides the detail. On a shop page, the grain of the oak matters. On a delivery page, the same board is just "a parcel on a doorstep".
Don't start with "image of" or "photo of". The redundant alt text rule explains why: screen readers already announce the image, so people hear it twice. And never leave a file name in the field. "IMG_4032.jpg" is read out letter by letter, which the file-name rule calls worse than silence.
Logos, linked images and icons
These are what the W3C calls functional images, and the rule changes: "The text alternative for the image should convey the action that will be initiated (the purpose of the image), rather than a description of the image." Its own examples are "print this page" rather than "printer", "search" rather than "magnifying lens", and "Example.com homepage" rather than "Example.com logo".
A linked image with no alt at all is one of the most serious failures our checker finds. A screen reader announces "link", or reads out the web address, and nobody knows where it goes. That is the linked image with no name rule. If the link already has visible text, the image is repeating it, and the W3C applies an empty alt "to avoid redundancy and repetition".
A logo that is not a link is an image of text: the alt is the name, and the W3C says "There's no need to mention that it is a logo."
Charts, maps and screenshots
Some images cannot be described in a sentence. For these, the W3C's complex images tutorial says "a two-part text alternative is required": a short alt that identifies the image and says where the long description is, and the long description itself in the page. A table of the figures under a chart works well, and it helps sighted visitors too.
Pouring the whole chart into the alt attribute is the usual mistake. It cannot be skimmed or skipped part-way through, which is why our checker flags very long alt text.
Decorative images: when alt should be empty
The W3C's decorative images tutorial says a null alt (alt="") should be provided "so that they can be ignored by assistive technologies, such as screen readers." It also warns against leaving the attribute out altogether: "some screen readers will announce the file name of the image instead." That is why our checker treats a missing alt attribute as critical but an empty one as a deliberate choice.
Be honest about what is decorative. A stock photo of a laptop on a tax post usually is. A photo of your actual shop front on the contact page usually is not, because it helps people find you.
How long should alt text be?
WCAG sets no character limit. The GOV.UK design team's guide, What's the alternative?, says good descriptions "are concise, but describe what's in your images accurately enough to understand their context", and suggests imagining a post limited to 280 characters. Our rule flags alt text over about 150 characters, not because it breaks WCAG, but because it is tiring to listen to. If you need more, put it in the page.
Where to write alt text in WordPress
There are two places, and they do different jobs. WordPress's Image block documentation explains it: alt text added in the block settings "only applies to the image on that specific page or post", while alt text in the Media Library "sets the default alt text when you insert the image elsewhere." The block also has a "Mark as decorative" option, to use "only when it does not add meaningful information or functionality".
So set a sensible default in the Media Library, then change it in the block where the context is different, like the chopping board shown on a delivery page.
Finding the images that need fixing
Start with our free page checker on your home page and a product page. It flags missing alt, file names, "image of" openings, very long alt and linked images with no name, each with the fix. What it cannot do is judge whether the alt text you wrote describes the picture. That part needs a person.
On WordPress, the free A11yMate plugin scans every page of your site for the same problems, with no page cap. Pro adds the Alt Text Manager, which lists every image in the media library with missing or poor alt text so you can describe them in one sitting. A11yMate is not an overlay. An overlay script that guesses alt text in the visitor's browser leaves your pages unchanged, which is one reason overlays don't make a site compliant. Alt text written by you, stored in WordPress, is the fix.
Questions
How long can alt text be?
WCAG sets no character limit. What it asks is that the text alternative serves the same purpose as the image. The GOV.UK design team suggests imagining you are describing the picture in a post limited to 280 characters, and our checker flags alt text over about 150 characters as worth a second look. If you need more than a sentence or two, the image probably needs a long description in the page as well.
Do icons need alt text?
It depends what the icon does. An icon that is the only content of a link or button needs a text alternative that says what the control does, such as "Search" or "Print this page", because WCAG 1.1.1 says a control must have "a name that describes its purpose". An icon sitting next to a visible word that already says the same thing is decorative and should have an empty alt.
What should the alt text for a logo say?
The organisation's name, with no need to say it is a logo. If the logo links to your home page, which most do, it becomes a link and the W3C suggests saying where it goes, as in its own "W3C home" example. "Hartley's Bakery home" is better than "Hartley's Bakery logo".
When should alt text be empty?
When the image is purely decorative, repeats text that is already next to it, or is only there for visual effect. Use alt="" (an empty attribute) rather than leaving the attribute out: the W3C notes that without it, some screen readers read out the file name instead. In WordPress, the Image block has a "Mark as decorative" option for this.
Is alt text good for SEO?
Search engines read alt text, so a missing alt means they miss what the picture shows too. But write alt text for the person who cannot see the image, not for a keyword. Stuffing search terms into alt text makes it harder to listen to and is not what WCAG asks for.
Should alt text start with "image of"?
No. Screen readers already announce that it is an image, so "image of" makes people hear it twice. The GOV.UK design team puts it simply: "Never start your alt text with 'image of' as this will be obvious to the user." Our checker flags it as redundant alt text.
Sources
- Understanding Success Criterion 1.1.1: Non-text Content (W3C, WCAG 2.2).
- An alt Decision Tree (W3C Web Accessibility Initiative).
- W3C images tutorials: decorative, functional, images of text and complex images.
- What's the alternative? How to write good alt text (GOV.UK Design102 blog, 14 January 2022).
- Image block (WordPress documentation).
A11yMate helps you work towards WCAG 2.2 AA. No tool makes a site compliant on its own.