Dispatch
What Is Alt Text and How Should You Write It
Alt text (short for "alternative text") is the HTML attribute that describes an image's content or function in words: <img src="shoe.jpg" alt="Men's blue running shoe, side view">. It exists for...
On this page
Alt text (short for “alternative text”) is the HTML attribute that describes an image’s content or function in words: <img src="shoe.jpg" alt="Men's blue running shoe, side view">. It exists for two overlapping but distinct reasons. First, it’s an accessibility feature: anyone using a screen reader, or anyone whose browser fails to load an image, encounters the alt text instead of the picture itself. Second, it’s a relevance signal: search engines can’t “see” an image the way a person does, so alt text, along with the surrounding page content and file context, is one of the main ways a search engine understands what an image shows and what it’s for.
Both purposes matter, and they usually point in the same direction. Text that genuinely describes an image well for a person who can’t see it also tends to be exactly the kind of specific, contextual description that helps a search engine connect the image to the page’s topic.
What Good Alt Text Looks Like
The core principle is simple: describe what the image shows or does, in plain language, as if you were describing it to someone over the phone. A few concrete guidelines follow from that:
- Be specific, not generic. “Running shoe” describes almost nothing useful. “Men’s trail running shoe in slate gray, three-quarter view” actually tells someone what they’re missing.
- Skip the “image of” / “picture of” prefix. A screen reader already announces that the element is an image before reading the alt text, so starting the text itself with “image of” is redundant. Just describe the content directly.
- Match the image to its function, not just its appearance, when it’s doing a job. A magnifying-glass icon that opens a search bar should have alt text describing the action (“Search”) rather than a literal visual description (“magnifying glass icon”). The same logic applies to any image acting as a button or a link: describe what activating it does, not what it looks like.
- Keep it reasonably concise. There’s no hard technical limit screen readers enforce, but writing alt text that runs to multiple sentences usually means you’re overloading one attribute with information that belongs in surrounding body text instead. A commonly cited rough guideline in accessibility writing is to aim for roughly 125 characters or fewer as a practical target for conciseness, not because screen readers truncate or mishandle longer text (behavior varies by software and isn’t a hard cutoff), but because forcing yourself toward a concise description tends to produce better, more usable alt text than letting it sprawl.
- Don’t keyword-stuff it. Alt text crammed with repeated keywords (“running shoes, best running shoes, running shoes for men, buy running shoes”) reads as nonsense to anyone listening to it and works against you. Google’s own image SEO documentation explicitly warns that stuffing alt attributes with keywords creates a negative user experience and can cause a page to be seen as spam.
Decorative Images Are the Exception
Not every image needs descriptive alt text, and that’s by design. Purely decorative images, a background flourish, a divider graphic, a stock photo that adds no information beyond what’s already in the surrounding text, should generally get an empty alt attribute: alt="". The W3C’s guidance on decorative images explains why this matters: leaving the alt attribute off entirely isn’t a safe substitute, because some screen readers will fall back to announcing the image’s file name when no alt attribute is present at all, which is often worse than saying nothing. An explicit empty alt="" tells assistive technology to skip the image cleanly, avoiding both a meaningless announcement and unnecessary clutter for someone trying to get through the page efficiently. The W3C also publishes a practical alt decision tree for working through whether a given image is functional, informative, or purely decorative, which is a useful gut-check when it’s not obvious.
What Alt Text Is Not For
It’s worth being clear about where alt text’s job ends. It is not a place to dump a full keyword list, not a place to write marketing copy unrelated to the image’s literal content, and not a substitute for genuinely useful surrounding text. If an image carries information important enough to need a full paragraph of explanation, a caption or body text near the image is the better home for that detail, alt text should still describe the image itself concisely. Similarly, for purely functional images, icon-only buttons, form submit graphics, navigation arrows, the alt text should describe the function the element performs, not its visual design.
Alt Text and Google’s Image Systems
Google has been explicit that alt text is one of several inputs it uses to understand images, not the only one. Its image SEO documentation states that Google uses alt text along with computer vision algorithms and the surrounding page content to determine what an image depicts and how it relates to the page. That combination matters in two practical ways:
- Google Images and image search. Descriptive, accurate alt text, paired with relevant filenames and nearby page text, is part of what helps an image surface for relevant queries in Google Images.
- Images used as links. When an image itself functions as a clickable link (no separate text link nearby), Google treats the image’s alt text the way it would treat anchor text on a normal text link, according to the same documentation. That makes accurate alt text on linked images functionally important for how that link is understood, not just a nice-to-have.
Google Lens and other visual-search tools layer additional computer-vision analysis on top of this, recognizing objects, text, and scenes directly within an image. That doesn’t make alt text obsolete: visual recognition can identify what’s broadly present in an image, but it can’t reliably capture context, like why an image is on a particular page, what brand or model is shown, or what action a button performs. Alt text and visual AI are complementary signals, not substitutes for each other.
A Quick Reference
| Image type | Alt text approach |
|---|---|
| Informative image (product photo, infographic, illustrative photo) | Concise, specific description of what's shown |
| Purely decorative image (background texture, divider, generic stock accent) | Empty <!–INLINECODE3–> |
| Functional image (icon button, linked logo, form control) | Describe the function/action, not the appearance |
| Complex image needing detailed explanation (chart, diagram) | Short alt text plus a fuller text description nearby in the page content |
| Image acting as the only link to a destination | Treat alt text like you would anchor text: describe where the link goes or what it does |
The Practical Takeaway
Good alt text is specific, honest, and reasonably brief, written to actually help someone who can’t see the image understand what they’re missing or what an element does. When you write for that person first, the SEO benefit follows naturally, because the same specificity that helps a screen reader user also gives search engines real context instead of generic noise. The main things to avoid are leaving meaningful images with no alt text at all, attaching unnecessary alt text to purely decorative images, and stuffing keywords where a plain description belongs. If you’re auditing an existing site, start with product and hero images, they carry the most search and accessibility weight per image, and a missing or generic alt attribute there costs the most.