Last updated: November 2026. Written by Syed Usman Riaz.
Alt text (alternative text) is a short written description of an image, added in the HTML alt attribute, that tells people and machines what the image shows and why it is on the page. Screen readers read it aloud to blind and low-vision users, browsers show it when an image fails to load, and Google uses it, together with computer vision, to understand the image. Good alt text is one plain, specific sentence that fits the context of the page. Decorative images get an empty alt="" so screen readers skip them.
This guide covers what alt text is and where it lives, why it matters for accessibility and SEO, when to leave it empty, a simple method for writing it, 40 alt text examples sorted by image type, charts and complex images, using AI to draft alt text, and how to add and audit it in WordPress with free tools.
Key takeaways
- Describe purpose, not just pixels. Ask: if I described this image to someone on the phone, in the context of this page, what would I say?
- Be specific and concise. There is no official character limit. One clear sentence is right for most images.
- Use
alt=""for decoration, and never leave thealtattribute out completely. - Linked images and icon buttons describe the action, such as “Download the 2026 price list”, not the picture.
- Charts need the takeaway in the alt and the full data in text on the page.
- Keywords only where they fit naturally. Google warns that stuffing alt text with keywords can make a site look like spam.
What is alt text?
Alt text is a text alternative for an image. It sits inside the <img> tag of your page’s HTML, in the alt attribute:
<img src="red-trail-running-shoe.webp" alt="Red trail running shoe with a deep-lug rubber sole, side view" width="800" height="600">
Visitors who can see the image never see this text. It is used in three places:
- Screen readers. Software such as NVDA, JAWS, VoiceOver and TalkBack reads the alt text aloud when it reaches the image.
- Broken or blocked images. If the image fails to load (slow connection, wrong path, images turned off), the browser shows the alt text in its place.
- Search engines and AI tools. Google reads alt text to understand what an image shows and how it relates to the page.
People also call it “alt tag”, “alt attribute” or “alt description”. Technically it is an attribute, not a tag, but they all mean the same thing.
What is the difference between alt text, title, caption and file name?
These four are often mixed up, and each one does a different job. Only alt text replaces the image for someone who can’t see it.

| Element | Where it lives | Who sees it | Main job |
|---|---|---|---|
| Alt text | alt attribute on <img> | Screen reader users, search engines, anyone whose image fails to load | Replace the image with words |
| Title attribute | title attribute on <img> | Mouse users as a hover tooltip; many screen readers and all touch screens ignore it | Optional extra hint. Not a substitute for alt |
| Caption | Visible text under the image, usually <figcaption> | Everyone | Add context, credit or a takeaway |
| File name | The image URL, such as blue-ceramic-mug.webp | Search engines, and anyone who downloads the file | A small extra clue about the subject |
Google’s image guidelines say it extracts information about the image from the page content, including captions, and recommend short, descriptive file names such as my-new-black-kitten.jpg instead of IMG00023.JPG (Google image SEO best practices). The same page doesn’t mention the title attribute at all, so treat it as optional.
One rule for captions: if the caption already describes the image fully, keep the alt short so a screen reader user doesn’t hear the same sentence twice. The alt can focus on what the caption leaves out.
Why does alt text matter for accessibility?
For a blind or low-vision visitor, an image without alt text is a gap. Depending on the screen reader, they may hear nothing, the word “image”, or the file name read out letter by letter, such as “IMG underscore 4 8 2 1 dot jpg”.
Alt text is also a legal and contractual standard in many places. The Web Content Accessibility Guidelines (WCAG) 2.2, the W3C standard that most accessibility laws and procurement rules point to, include Success Criterion 1.1.1 Non-text Content (Level A). It requires that non-text content has a text alternative that serves the equivalent purpose, that controls such as image buttons have a name describing their purpose, and that pure decoration is built so assistive technology can ignore it (W3C: Understanding SC 1.1.1). Level A is the minimum level, so missing alt text is one of the first things any accessibility audit flags.
I lost most of my hearing as a teenager, so I know how it feels when a video has no captions and the content simply isn’t there for you. Missing alt text does the same thing to someone who can’t see the image.
Does alt text help SEO?
Yes. Google says alt text is “the most important attribute” for giving it more information about an image, and that it uses alt text along with computer vision to understand the image’s subject (Google Search Central). That helps in four ways:
- Google Images and image results in normal search. Clear alt text helps an image show for the right searches.
- Page relevance. Alt text is part of the page’s text, so it supports the page topic, as long as it describes the image honestly.
- Linked images. When an image is a link, Google treats its alt text like anchor text, so it tells Google what the linked page is about.
- AI tools. A plain description gives any tool that reads your page as text a version of what the image shows.
Google also warns that filling alt attributes with keywords creates a poor user experience and may cause the site to be seen as spam. Alt text is one part of image optimization, alongside file size, formats and lazy loading, and one part of good on-page SEO.
One technical point: Google doesn’t index images added as CSS backgrounds. If an image carries meaning, put it in an <img> element with alt text.
When should alt text be empty (alt=””)?
Use an empty alt attribute when the image adds nothing a listener would miss. The W3C publishes an alt decision tree for this. In short, ask these questions in order:

- Does the image contain text? If the same text is already on the page as real text, use
alt="". If the text appears only in the image, put that text in the alt. - Is the image a link or button, and would its purpose be unclear without it? Describe the destination or action, such as “Search” or “Go to homepage”.
- Does the image add meaning to the page? For a simple photo or graphic, write a short description of that meaning. For a chart or complex diagram, give a short alt and put the full information elsewhere on the page.
- Is the image purely decorative? Use
alt="".
Here is the difference in code:
<!-- Decorative: screen readers skip it -->
<img src="divider-wave.svg" alt="">
<!-- Missing alt: some screen readers read the file name -->
<img src="divider-wave.svg">
Empty alt and missing alt are not the same. alt="" is a deliberate instruction to skip the image. A missing alt attribute is an error, and screen readers try to guess, often by reading the file name. Never write a space (alt=" ") or the word “decorative” either; just leave the quotes empty.
Common decorative images: background patterns, divider lines, stock photos that only add mood next to a heading, and icons that sit beside a text label that already says the same thing.
How do you write good alt text? (4-step method)
In my client work since 2014, the biggest alt text problem I see isn’t missing alt text. It’s alt text written by someone who never looked at the page around the image. This four-step method fixes that.

- Find the purpose. Why is this image here? To show a product, prove a result, explain a process, identify a person, or start an action? If it has no purpose, use
alt=""and stop. - Name the subject and the detail that matters. Lead with the most important thing, then add the one or two details that matter in this context: colour, action, setting, count, result.
- Cut the filler. Remove “image of”, “picture of”, “photo of” (screen readers already announce it as an image), and anything the surrounding text already says.
- Check it in context. Read the paragraph before the image, then your alt text, then the paragraph after. Does it flow, and would a listener miss anything? Add a keyword only if it is a natural, accurate description.
Example: one photo, three contexts
The same photo of a woman holding a coffee cup at a laptop needs different alt text on different pages:
| Page | Alt text |
|---|---|
| Coffee shop “Our space” page | alt="Customer working on a laptop at a window table, latte in hand" |
| Laptop review | alt="The 14-inch laptop on a cafe table, screen at full brightness in daylight" |
| Blog post on remote work | alt="Freelancer working from a busy cafe" |
Context decides what matters. That is why AI tools that only see the pixels often miss the point.
How long should alt text be?
There is no strict character limit in the HTML standard, in WCAG or in Google’s guidelines. The common advice of “125 characters” is a rule of thumb, not a rule; screen readers read the whole alt text. My practical guide:
| Image type | Typical length | Why |
|---|---|---|
| Logo, icon, button | 1 to 5 words | Name or action is all a user needs |
| Photo (product, team, place) | 5 to 20 words | One sentence with the key detail |
| Screenshot | 1 to 2 short sentences | What it shows and the one thing to notice |
| Chart, infographic | 1 to 2 sentences plus text on the page | The takeaway in alt, full data in the page |
If your alt text runs to three or four sentences, the information probably belongs in the visible text or a caption, where every reader benefits.
40 alt text examples by image type
Each example below is written for a realistic page context, shown in the first column. Names, brands and numbers are made-up illustrations. Use them as patterns, not copy-paste text: your alt text should describe your own image.
Product images (5 examples)
| Context | Weak alt | Good alt |
|---|---|---|
| Shoe product page | shoe | Red trail running shoe with a deep-lug rubber sole, side view |
| Wallet, second gallery image | wallet 2 | Brown leather bifold wallet open, showing six card slots |
| Kitchen mixer, colour option | mixer | Stand mixer in sage green with a 5-litre stainless steel bowl |
| Dress worn by a model | dress | Model wearing the navy linen midi dress with short sleeves, front view |
| Phone case, close-up | case detail | Close-up of the phone case's raised edge around the camera lenses |
Team and people photos (5 examples)
| Context | Weak alt | Good alt |
|---|---|---|
| About page headshot | headshot | Dr Sara Malik, lead dentist, smiling in the clinic reception |
| Team page group photo | team | Our five-person support team standing outside the Lahore office |
| Service page, at work | plumber | Plumber replacing a leaking tap under a kitchen sink |
| Event recap | event photo | Speaker presenting to about 40 attendees at a local business meetup |
| Testimonial photo | customer | Aisha Khan, owner of a bakery and one of our website clients |
Logos (4 examples)
| Context | Weak alt | Good alt |
|---|---|---|
| Site header logo, links home | logo | Dawn of Progress home |
| Client logo strip | client logo 3 | Acme Dental |
| Award badge | badge | Winner, 2026 City Small Business Awards |
| Logo next to the same company name in text | Acme Dental logo | alt="" (the name is already in the text) |
For logos, the company name is usually enough. Add “logo” only when the fact that it is a logo matters, for example on a page about a rebrand.
Charts and graphs (4 examples)
| Context | Weak alt | Good alt |
|---|---|---|
| Traffic report | chart | Line chart: organic visits rose from 1,200 in January to 3,400 in June 2026 |
| Device split | pie chart | Pie chart: 72% of visits came from mobile, 28% from desktop |
| Price comparison | bar chart of prices | Bar chart comparing three plans; the Pro plan costs half as much per user as Basic |
| Chart fully explained in the paragraph above | graph | Bar chart of the monthly sales figures listed above |
The numbers in these examples are illustrations; use your chart’s real figures.
Infographics (3 examples)
| Context | Weak alt | Good alt |
|---|---|---|
| Process infographic | infographic | Infographic: the 5 steps of our website project, from brief to launch. Steps listed below. |
| Statistics infographic | stats | Infographic of five home energy facts; full text follows the image |
| Comparison infographic | comparison | Infographic comparing WebP, AVIF and JPEG on size and browser support; details in the table below |
Screenshots (4 examples)
| Context | Weak alt | Good alt |
|---|---|---|
| Tutorial step | screenshot | WordPress image block settings with the Alternative text field highlighted |
| Search Console guide | GSC | Search Console Performance report showing clicks and impressions for the last 3 months |
| Error message | error | Browser error message reading "This site can't be reached" |
| App feature page | app screen | Mobile booking screen showing available appointment times for Friday |
Icon buttons and functional images (5 examples)
| Context | Weak alt | Good alt |
|---|---|---|
| Magnifying glass search button | magnifying glass | Search |
| Hamburger menu icon | three lines | Open menu |
| Cart icon with item count | cart icon | Shopping cart, 2 items |
| Close (X) icon on a pop-up | x | Close |
| Printer icon | printer | Print this recipe |
Linked images (4 examples)
| Context | Weak alt | Good alt |
|---|---|---|
| Social media icon | facebook icon | Dawn of Progress on Facebook |
| Blog card thumbnail, no text link | thumbnail | Read: How to write a title tag |
| PDF download cover | brochure | Download the 2026 price list (PDF) |
| Thumbnail next to a text link to the same page | article image | alt="" (the text link already names the page) |
Decorative images (3 examples)
| Context | Weak alt | Good alt |
|---|---|---|
| Wavy section divider | divider | alt="" |
| Abstract background shape behind a hero | blue shape | alt="" |
| Stock “teamwork” photo beside a heading | teamwork business people happy | alt="", or describe it if it shows your real team |
Blog and service images (3 examples)
| Context | Weak alt | Good alt |
|---|---|---|
| Recipe post | food | Stack of three pancakes topped with blueberries and maple syrup |
| Before/after renovation | before after | Bathroom before and after: cracked green tiles replaced with white tiles and a walk-in shower |
| Travel post | beach | Empty sandy beach at sunrise with fishing boats pulled up on the shore |
How do you write alt text for charts and complex images?
A chart or diagram holds more information than one sentence can carry. The W3C’s guidance on complex images uses a two-part approach:
- Short alt text that says what the image is and its main takeaway, for example “Line chart: organic visits tripled between January and June 2026.”
- A long description with the full information, as real text on the page: a data table, a list of steps, or a paragraph right under the image. Tell users where it is (“Data in the table below”).
<figure>
<img src="organic-visits-2026.webp"
alt="Line chart: organic visits tripled between January and June 2026. Monthly figures in the table below.">
<figcaption>Organic visits per month, January to June 2026</figcaption>
</figure>
<!-- followed by an HTML table with the monthly numbers -->
This helps everyone: screen reader users get the full data, and search engines can read numbers that would otherwise be locked inside pixels.
For inline SVG graphics, there is no alt attribute. Add a <title> element inside the SVG (Google mentions this in its image guidelines), and for accessibility also give it role="img":
<svg role="img" aria-labelledby="chart-title" viewBox="0 0 400 200">
<title id="chart-title">Bar chart: 72% of visits from mobile, 28% from desktop</title>
<!-- shapes -->
</svg>
Can you use AI to write alt text?
Yes, as a first draft. Vision tools such as ChatGPT, Gemini and Claude describe photos well, and some WordPress plugins and CMSs now generate alt text automatically. The weakness is context: the tool sees the image but not why it is on your page, so it describes everything and stresses the wrong detail. It can also misread text, numbers and people’s names.
Give the AI the context, then check every result yourself.
Prompt: draft alt text with context
“Write alt text for the attached image. Page: [page title and URL]. Purpose of the image on this page: [for example, show the product’s colour options]. Text right before and after the image: [paste]. Rules: one sentence, under 20 words if possible; start with the most important detail; don’t begin with ‘image of’ or ‘picture of’; include any text shown in the image; don’t guess names, brands or numbers you can’t read clearly; if the image is purely decorative, reply only with alt=””. Give me two options.”
Before you publish an AI draft, check four things: is it accurate (colours, counts, text in the image), does it match the page’s purpose, is anything guessed (a name, a place, a brand), and is it short enough? For bulk work, such as 2,000 product images, AI drafting plus spot checks is reasonable, but review your most important pages by hand. More on this kind of workflow in how to use AI for a smarter SEO strategy.
How do you add alt text in WordPress?
WordPress gives you two places to add alt text:
- In the block editor. Click the image, open the block settings sidebar on the right, and fill in the Alternative text field. This sets the alt for that one use of the image.
- In the Media Library. Go to Media → Library, click the image and fill in Alternative Text in the attachment details. This becomes the default alt when you insert the image in future.
A detail that catches many site owners: changing the alt in the Media Library usually doesn’t update images already placed in posts, because the alt was copied into the post when you inserted it. Fix older posts in the editor, one image at a time, or with a bulk-edit plugin you trust.
Also note that when you leave the field blank, WordPress outputs an empty alt="". That is correct for decorative images, but it means a meaningful image with no alt won’t show up as “missing” in some tools. Check by eye too. For more WordPress fixes, see my WordPress SEO guide.
How do you audit your site’s alt text with free tools?
You don’t need paid software to find alt text problems. These free tools cover most sites:
| Tool | What it finds | Best for |
|---|---|---|
| Chrome Lighthouse (DevTools → Lighthouse → Accessibility) | Images with no alt attribute | One page at a time |
| WAVE by WebAIM | Missing alt, suspicious alt (file names, “image of”), linked images with no text | Visual check of one page |
| Screaming Frog SEO Spider (free up to 500 URLs) | Missing alt attributes and missing alt text, site-wide, with the pages they appear on | Whole small sites |
| Browser “view page source” or Inspect | The exact alt value of any image | Spot checks |
A simple audit routine:
- Crawl the site and export every image with missing alt text, with the pages it appears on.
- Sort by page importance. Fix the homepage, service pages, top products and top blog posts first.
- Decide each image’s purpose using the decision tree: describe it, describe the action, or set
alt="". - Write and add the alt text using the four-step method.
- Check with a screen reader on one or two key pages. NVDA is free on Windows, and VoiceOver is built into Macs and iPhones. Listening once teaches more than any checklist.
- Add alt text to your publishing checklist so new images never go out without it.
For a full site review, alt text fits into a broader SEO audit, and my list of free SEO tools covers more crawlers and checkers.
What are the most common alt text mistakes?
- Keyword stuffing.
alt="plumber london cheap plumber best plumbing london"helps no one and Google calls it out as spam-like. Writealt="Plumber fixing a boiler in a London flat"instead. - Starting with “image of” or “picture of”. Screen readers already announce an image. Exception: say “Screenshot”, “Painting” or “Illustration” when the format itself matters.
- Leaving the attribute out. Missing
altmakes screen readers guess, often reading the file name. - Describing decoration. Writing “blue abstract wave shape” on a divider wastes the listener’s time.
- Describing the icon instead of the action. “Magnifying glass” tells nobody that the button searches.
- Copying the file name or the page title into every image’s alt.
- The same alt on every image in a gallery, for example ten product photos all called “Blue sofa”. Say what each one shows: front view, fabric close-up, with cushions.
- Putting important text only inside an image. Prices, offers and phone numbers in images are hard to read for screen readers, translation tools and search. Keep them in real text too.
- Trusting AI drafts without checking. Wrong colours, made-up names and misread numbers are common.
- Using the title attribute instead of alt. Touch screens and many screen readers never reach it.
Frequently asked questions
What is alt text in simple words?
It is a short written description of an image, hidden in the page code. People who can’t see the image hear it through a screen reader, and search engines read it to understand the image.
What is a good example of alt text?
alt="Dalmatian puppy playing fetch" is Google’s own example of good alt text: specific, short and accurate. Compare it with alt="puppy" (too vague) and a list of dog-related keywords (stuffing).
How many characters should alt text be?
There is no official limit. Keep most alt text to one sentence; for images that need more, put the detail in visible text on the page.
Should every image have alt text?
Every <img> element should have an alt attribute. Meaningful images get a description; decorative images get an empty alt="".
Should I put keywords in alt text?
Only when the keyword is a natural, accurate description of the image. A photo of a dental implant on a dental implant page can say so. Adding keywords to unrelated images doesn’t help and can look like spam.
Do background images need alt text?
CSS background images can’t take an alt attribute, and Google doesn’t index them. If a background image carries meaning, switch it to an <img> with alt text, or describe it in visible text.
What alt text should a logo have?
Usually just the company name. If the logo links to the homepage, use the name plus where it goes, such as “Acme Dental home”.
