SEO
Alt Text: What It Is and How to Write It (With Examples)
What alt text does for screen readers and Google, a step-by-step way to write it, and examples measured character by character for product photos, charts, logos and decorative images.
Alt text is the short description of an image you write in the HTML alt attribute for people who can't see it. Screen readers read it aloud, browsers show it when an image fails to load, and Google uses it to understand what's in the picture.
Writing good alt text takes seconds, and most sites still get it wrong. We checked 10 top-ranking pages that teach alt text and 4 of them had images with no alt at all. This guide covers what Google says, how long alt text should be and good-vs-bad examples by image type, measured character by character.
It's a small piece of SEO with a double payoff: a more accessible site and images Google understands better.
On this page
What is alt text (and what it isn't)
Alt text is a brief description of an image placed in the alt attribute, which stands in for the image when it can't be seen.
Alt text, short for alternative text, is a short piece of text inside the HTML img tag that says what an image shows and why it's there. Screen readers used by blind people read it, browsers display it if the image fails and search engines use it to index the image. That's the alt text meaning in one line: the image, in words.
What it isn't: it isn't the caption under the photo, it isn't the title attribute that pops up on hover and it isn't the file name. It's not a keyword slot either. And it's the very first rule of WCAG compliance: success criterion 1.1.1, Level A.
Here's how people in the US search for it, according to DataForSEO (12-month average, checked late October 2026).
| Search | Per month | What they want |
|---|---|---|
| alt text | 5,400 | The basics (keyword difficulty 70) |
| what is alt text | 2,900 | The definition |
| alt text generator | 2,900 | A tool that writes it |
| image alt text | 1,900 | Alt text for photos |
| alt text examples | 1,600 | Models to copy (up 90% in a year) |
| alt text meaning | 1,000 | What "alt" stands for |
| how to write alt text and alt text html | 590 and 590 | The method and the code |
| alt text seo | 480 | Whether it helps rankings |
| alt text best practices | 320 | The rules |
Alt text SEO: what Google actually says
Google calls alt text the most important attribute for giving it information about an image, and warns against filling it with keywords.
In its image SEO best practices, updated March 2, 2026, Google says it uses alt text together with computer vision algorithms and the contents of the page. Its own example goes from worst to best: no alt, an alt stuffed with puppy keywords, just "puppy" and, best, a Dalmatian puppy playing fetch.
Two details most guides skip. Google doesn't index images set as CSS backgrounds, so those can't carry alt text at all. And it wants short, descriptive file names: navy-running-shoe.jpg beats IMG00023.JPG. If images matter to your business, you can also list them in your XML sitemap.
Does alt text help with Google Discover?
It helps Google understand the image, which is the foundation. But what wins a Google Discover card is a large image, 1,200 px wide or more, and an honest headline.
How to write alt text, step by step
To write alt text, decide what the image adds to that specific page and say it in one sentence, without "image of" or filler.
-
Decide whether the image informs or decorates
If you removed it and nothing would be lost, it's decorative: give it
alt=""and move on. If something would be lost, keep going. -
Ask what someone who can't see it would miss
That's what you write. The same photo can need two different alts on two different pages.
-
Write one sentence, no "image of"
Screen readers already announce that it's an image. Go straight to what's in it.
-
Use your keyword only if it describes the image
If the photo shows a running shoe, saying so is describing. Repeating "cheap sneakers" three times is spam.
-
Check the length
Paste it into our character counter. If it runs past two sentences, what you need is a description in the page text.
-
Listen to it with a screen reader
NVDA is free on Windows and VoiceOver comes with every iPhone and Mac. Hearing your site once changes how you write alt text for good.
Here's a product photo done right in HTML:
<img src="navy-running-shoe.jpg" alt="Navy blue running shoe with a white sole, side view">
How long should alt text be?
There's no official limit. Google gives no number, and WebAIM's alternative text guide, the go-to accessibility reference, says a few words are usually enough. The 125-character rule repeated across the web doesn't appear in either source. Our good examples below run from 27 to 60 characters.
Act as a web accessibility specialist. Here's an image on my site: [what it shows] and the page it's on: [page topic]. Write one-sentence alt text that explains what the image adds to that page, without starting with "image of" and without repeating keywords. If you think it's decorative, tell me to use an empty alt and why.
Alt text examples: good vs. bad by image type
Good alt text depends on the image type: for a product, describe what's for sale; for a chart, give the conclusion.
| Image type | Bad | Good | Characters |
|---|---|---|---|
| Product photo | sneakers | Navy blue running shoe with a white sole, side view | 51 |
| Sales chart | chart1 | Bar chart: fourth-quarter sales are double the first quarter | 60 |
| Logo linking home | logo | Lola Bakery, go to homepage | 27 |
| Banner with text | sale banner | 30% off everything in store through Sunday | 42 |
| Team photo | team photo | The founder kneading dough in the bakery | 40 |
| Divider line | divider | (empty: alt="") | 0 |
The costliest bad version is keyword stuffing: "cheap sneakers buy running sneakers sale sneakers" is 49 characters, about the same as the good one, and describes nothing.
What alt text do decorative images get?
The right alt text for decorative images is an empty one: alt="". WebAIM says it plainly. If you drop the attribute entirely, many screen readers read the file name instead, and nobody wants to hear "divider dash two dot png" read aloud.
Alt text generator: can AI write your alt text?
Yes, as a first draft. An alt text generator looks at pixels, so it can't know why a picture sits on your page. That part is your job.
Ahrefs, for example, offers a free AI alt text generator. You upload one JPG, PNG or GIF under 10 MB, add context if you like, and it returns three variants. Instagram, Facebook and Word also suggest alt text on their own.
Here's where drafts usually need a rewrite. These are invented examples of the vague drafts such tools tend to give, not real output from any of them.
| Image | Typical AI draft | What to write instead |
|---|---|---|
| Product photo | A ceramic mug | Green glazed ceramic mug, 12 oz, with a wide handle |
| Report screenshot | Screenshot of a graph | Search Console report: clicks rise from 800 to 1,900 in three months |
| Event poster | Colorful poster with text | Free local SEO workshop on November 14 in Austin, 6 p.m. |
| Portrait in an article | Smiling woman with a laptop | Founder Lucy Ferrer walking the team through the marketing plan |
Our rule: let AI draft the simple photos, and write the screenshots, posters and charts yourself. Always give it the page context, and run every draft through the cover-the-image test.
How to add alt text to an image in WordPress and Shopify
In WordPress and Shopify you add alt text in a field on each image, no code needed; just know where the field lives.
- WordPress: click the image in the block editor and fill in "Alternative text" in the sidebar. Do it inside the post, not only in the media library, because changing it there doesn't update images already inserted in older posts.
- Shopify: open the product, click the image in the media section and look for the alt text option. Write it for every product photo, not just the first one.
Missing alt text: how to find and fix it across your site
Check one page by hand, then crawl the rest with a tool. On a single page, right-click an image, choose Inspect and look at the img tag. No alt attribute at all is the worst case; an empty alt="" is correct when the image is decorative.
To crawl everything, Screaming Frog's SEO Spider has three alt filters in its Images tab: Missing Alt Text (the attribute exists but is empty), Missing Alt Attribute (no attribute at all) and Alt Text Over 100 Characters. The free version crawls up to 500 URLs, and the paid license cost £199 a year as of October 2026.
Don't treat every flag as a bug. Say a crawl of 120 pages flags 340 images. Maybe 90 are dividers and icons that should stay empty, 25 are logos and buttons, and 225 are product photos. That's an invented example, but the order is sensible: fix images inside links first, because a link with no name is unusable; then product photos and charts; and leave the decorative ones alone.
Start with your ten pages with the most clicks in Search Console. Ten pages fixed beat 120 pages half-fixed.
Frequently asked questions about alt text
Can AI write alt text?
Yes, as a first draft. Instagram, Facebook, Microsoft Word and plenty of alt text generator tools suggest one automatically. The catch is that AI describes what it sees, not why the image is on your page. It writes "man holding a mug" where you'd write "Our roaster tasting the Ethiopian beans before bagging them." Use it to save time, then edit every product photo, chart and button yourself.
What is alt text on Instagram?
Instagram alt text is a written description of your photo that screen readers read aloud to blind and low-vision users. Instagram generates one automatically with AI, but it's usually vague. To write your own, tap Advanced settings before you share the post and add your alt text there; you can also edit it later from the post. Describe what matters in the photo in one sentence, not your hashtags.
How do I add alt text in Microsoft Word?
Right-click the image, chart or shape and choose View Alt Text. A pane opens where you can type your description, use the automatically generated suggestion as a starting point, or mark the image as decorative so screen readers skip it. Microsoft recommends one or two sentences. If you export the document as an accessible PDF, the alt text travels with the image.
Is alt text legally required?
For accessibility compliance, effectively yes. WCAG success criterion 1.1.1, the most basic Level A requirement, says images need text alternatives. Section 508 applies WCAG to US federal agencies, and the Justice Department's 2024 rule adopted WCAG 2.1 AA for state and local governments. Private businesses have no specific federal web rule, but ADA lawsuits over inaccessible websites are common, and images without alt text are the easiest problem to fix first.
How do you write alt text for charts?
State the takeaway in the alt and put the details somewhere else. A good chart alt reads like a headline: what the chart shows and its key takeaway, in one sentence. If readers need the actual numbers, add a data table or a short paragraph right next to the chart, which WebAIM recommends for complex images. Never write only "chart" or "graph": that tells a screen reader user nothing.
What alt text should a logo have?
The company name, plus the destination if the logo is a link. If your logo in the header takes people to the homepage, "Lola Bakery, homepage" is perfect. Skip "logo" on its own and skip slogans. If the brand name already appears as text right next to the logo, the logo can be treated as decorative with an empty alt so screen readers don't repeat it.