How to Write Alt Text: The Complete Guide to SEO and Accessibility

SEO Oct 13, 2026 6 min read

Alt text is an HTML attribute on image tags, and it’s one of the most commonly misused elements on the web — either left blank, filled with meaningless filenames, or stuffed with keywords. Done correctly, alt text improves both search engine rankings and accessibility for visually impaired users. This guide explains what alt text is, why it matters, how to write it well, and provides extensive before-and-after examples for every major image type.

What Is Alt Text?

Alt text is the alt attribute of the HTML <img> tag:

<img src="running-shoes.jpg" alt="Red Nike Air Max 90 running shoes, side view, white sole">

When an image fails to load — due to a broken link, network error, or a user setting that blocks images — alt text displays in the image’s place, informing the user what was there. For visually impaired users relying on screen readers (NVDA, JAWS, Apple VoiceOver), the screen reader reads the alt text aloud, conveying the image’s information in words.

The Dual Function of Alt Text

Function 1: Search Engine Optimization

Google’s crawlers can read alt text directly and use it to understand what an image depicts. While Google Vision AI can analyze image content visually, alt text remains the clearest, most reliable signal:

Function 2: Web Accessibility

According to the World Health Organization, approximately 285 million people worldwide have visual impairments, many of whom browse the web using screen readers. Images without alt text are information voids — the screen reader announces “image.jpg” or skips the element entirely, conveying nothing.

In many countries (including the US ADA, EU EN 301 549 standard), web accessibility is a legal requirement. Proper alt text is a core component of compliance.

Alt Text Writing Principles

  1. Describe what’s actually in the image: Write what you see — not what you wish would rank in search
  2. Incorporate keywords naturally: If a keyword genuinely describes the image content, include it — it should emerge naturally from the description
  3. Be specific but concise: 5–15 words covers most situations; avoid essays
  4. Don’t begin with “Image of…” or “Picture of…”: Search engines and screen readers already know it’s an image
  5. Don’t keyword-stuff: alt="running shoes athletic shoes jogging shoes sneakers trainers" is spam; Google may treat it as such and penalize the page
  6. Don’t duplicate surrounding text: If text next to an image already describes it fully, keep the alt text shorter to avoid redundancy for screen reader users

Good vs. Bad Alt Text: Side-by-Side Examples

Scenario 1: Product Image (Running Shoes)

Scenario 2: Recipe Image (Chocolate Lava Cake)

Scenario 3: Person / Portrait

Scenario 4: Infographic

Scenario 5: Purely Decorative Images

Scenario 6: Linked Images (Clickable Images)

Alt Text Examples by Context

E-commerce:

Blog and News:

Company Website:

Service Page Icons:

Recommended Alt Text Length

Frequently Asked Questions

Q: Does every image need alt text?
A: Every image with meaningful informational content needs descriptive alt text. Purely decorative images should use an empty alt="" to signal screen readers to skip them.

Q: If the same image is used on multiple pages, should the alt text be identical?
A: Not necessarily. Alt text should be written in context for the specific page. The same image might play different roles on different pages, and the alt text can reflect that.

Q: My CMS (like WordPress) has both “Alt Text” and “Caption” fields — what’s the difference?
A: Alt text is an HTML attribute visible to screen readers and search engines but not displayed to regular users. The caption appears visibly below the image for all users. Both serve different purposes and both should be filled in thoughtfully.

Conclusion

Alt text is a small HTML attribute with significant responsibilities: it helps search engines understand images, enables visually impaired users to access your content, and provides fallback information when images fail to load. Effective alt text is honest and concise — a faithful description of what’s in the image, with keywords incorporated only when they naturally belong. Building a habit of writing thoughtful alt text for every meaningful image is among the highest-value-per-effort improvements in SEO and accessibility work.

Do it in your browser — the file never leaves your device: Image Tools

Solve your file problem: Image Optimize Try it free — Image Optimize →