How to Write Alt Text for Images (SEO + Accessibility)
Write descriptive, keyword-aware alt text that improves rankings and makes your site accessible to screen reader users.
- Write descriptive, keyword-aware alt text that improves rankings and makes your site accessible to screen reader users.
- What Alt Text Is and Why It Matters.
- How to Write Effective Alt Text.
- Alt Text for Different Image Types.
- Common Alt Text Mistakes.
What Alt Text Is and Why It Matters
Alt text (alternative text) is an HTML attribute that describes what an image shows. It serves two critical purposes: it’s read aloud by screen readers for visually impaired users, and it’s used by search engines to understand image content for ranking in Google Images and web search. Alt text is also displayed when an image fails to load. Despite being one of the simplest SEO improvements, most websites either leave alt text empty or stuff it with keywords. Both approaches waste an opportunity to improve both accessibility and search visibility.
How to Write Effective Alt Text
Good alt text is concise (under 125 characters), descriptive, and specific. Describe what the image actually shows, not what you wish it showed. Instead of ‘image of a dog,’ write ‘Golden retriever puppy sitting on a red blanket in a sunny backyard.’ Include your target keyword naturally if the image is relevant to the page topic, but don’t force it. For product images, include the product name, color, and distinguishing features. For charts and graphs, describe the trend or key data point. For screenshots, describe what the interface shows.
Alt Text for Different Image Types
Different image types need different alt text approaches. Decorative images (visual flourishes, spacers, background textures) should have empty alt text (alt="") so screen readers skip them. Informational images (photos, illustrations that convey meaning) need descriptive alt text. Functional images (buttons, icons used as links) need alt text describing the action, not the icon (‘Search’ not ‘magnifying glass’). Complex images (charts, infographics, diagrams) need a brief alt text summary plus a longer description either in surrounding text or via aria-describedby. Logos should use the company name as alt text.
Common Alt Text Mistakes
The most common alt text mistakes are leaving it blank on informational images, writing ‘image of’ or ‘photo of’ (screen readers already announce it as an image), keyword stuffing, using the filename as alt text (‘IMG_4392.jpg’), and writing the same alt text for every image on a page. Another subtle mistake is being too brief — ‘team’ tells a screen reader user almost nothing, while ‘five developers working at a whiteboard during a sprint planning session’ paints a picture. Aim for descriptive specificity without being verbose.