Design
Writing Alt Text That Helps Everyone
Alt text is the caption an image wears when it cannot be seen. A screen reader speaks it aloud, a search engine reads it to understand the picture, and a browser shows it when the image fails to load. Three different audiences, one small line of text — and most of the web gets it wrong, either skipping it entirely or stuffing it with keywords. Getting it right is a genuine craft, and a quick one to learn.
What alt text is actually for
The purpose of alt text is to convey the content and function of an image to someone who cannot see it. Content is what the image shows. Function is what the image does — where it leads if it is a link, or what it communicates in context. Both matter, and which one dominates depends entirely on where the image sits.
The same photograph needs different alt text in different places. On a photographer's portfolio, a sunset photo's content is the point: "Orange sunset over a calm sea, silhouetted pier in the foreground." Inside a button that submits a form, the icon's function is the point: "Submit" — not "blue paper airplane icon." Always ask what the image is doing on this page before you describe what it looks like.
The core rules
A handful of rules cover almost every case you will meet.
- Describe, don't caption. Alt text is not a title. "Sunset" is a label; "Orange sunset over a calm sea" is a description someone can picture.
- Be concise. Aim for a sentence or less. Screen-reader users can skim, but only if each item is short. Long alt text is the audio equivalent of a wall of text.
- Skip "image of" and "photo of." The screen reader already announces that it is an image. Adding "image of" is like starting every sentence with "sentence:".
- Match the context. The right alt text depends on the surrounding content. If the paragraph already names the person in the photo, the alt text does not need to repeat their entire title.
- Don't keyword-stuff. Cramming search terms into alt text hurts the people it is meant to serve and, since search engines are wise to it, does nothing for ranking either.
The empty alt attribute is a feature, not a bug
One of the most useful things you can put in an alt attribute is nothing at all.
A purely decorative image — a background flourish, a divider, a stock photo that
adds mood but no information — should carry an empty alt (alt=""). That tells
assistive technology to skip it entirely.
The mistake to avoid is omitting the attribute rather than emptying it. When alt is missing, many screen readers fall back to reading the file name, so a user hears "I M G underscore 4 7 2 1 dot j p g." An empty alt says, clearly and on purpose, "there is nothing here you need." The distinction is small in markup and large in experience.
Complex images need more than a line
Charts, diagrams, and infographics carry more information than a sentence can hold. For these, the alt text should give the takeaway, and the surrounding page should provide the detail. A sales chart might have alt text of "Bar chart: revenue grew each quarter, roughly doubling over the year," with the exact figures available as a short data table or a paragraph nearby.
This pattern — headline in the alt, detail in the page — serves everyone. Sighted readers who miss the pattern in the chart get it in the prose, and search engines get a genuine textual description of what the graphic argues, which is worth far more than a list of keywords.
Where SEO fits in
It is true that good alt text helps SEO, but not in the way keyword guides imply. Search engines use alt text to understand image content, which helps images surface in image search and adds context to the page. The catch is that the behavior which helps accessibility — clear, honest, specific descriptions — is exactly the behavior that helps search. There is no separate "SEO alt text." Write for the human who cannot see the image, and the search engine gets what it needs as a side effect.
That framing keeps you out of trouble. Every time you are tempted to add a keyword that does not describe the image, picture a person hearing it read aloud. If it would confuse or annoy them, it is not helping your ranking either.
A quick workflow
When you add an image, run through three questions. Is it decorative? If so, give it an empty alt and move on. If not, what is it doing here — informing, or acting as a control? Describe that. Finally, read your alt text aloud as if you could not see the picture, and ask whether you would understand what you are missing.
That is the whole craft. It takes about fifteen seconds per image once it is a habit, and it quietly improves your site for the people who need it most — while handing search engines a clean, truthful description at the same time. Small effort, broad payoff, no trade-offs. That is a rare thing on the web, and worth doing every time.
FAQ
Frequently asked questions
How long should alt text be?
Usually a sentence or less. Describe the content and function of the image, then stop. If you need a paragraph, the detail probably belongs in the surrounding text.
Should decorative images have alt text?
No. Give purely decorative images an empty alt attribute (alt="") so screen readers skip them instead of announcing a distracting filename.
Written by
BlogsPublication Admin
EditorBlogsPublication reporting is guided by our editorial standards.
The newsletter
Good writing, once a week.
Our best essays and reporting, delivered to your inbox. No noise, unsubscribe anytime.
Comments
Sign in to join the discussion.
Loading comments…
Keep reading
Related articles
What Makes a Website Feel Trustworthy
Visitors decide whether they trust a site in seconds, mostly on how it looks. Here are the research-backed signals that build credibility — and a checklist to audit your own site.