Alt text is the most under-leveraged accessibility feature on the web. It helps screen reader users, gives Google context, and acts as a fallback when images fail to load. Here's how to write it well.
Alt text — the alt attribute on an HTML <img> tag — has been around since 1995. Three decades later, most websites still get it wrong. Either they omit it entirely, stuff it with keywords, or write something that doesn't help anyone.
This article covers what alt text is actually for, how to write it well, and what role it plays in SEO.
Alt text is a short text description of an image, set in the HTML:
<img src="photo.jpg" alt="A red apple on a wooden table">
It serves three purposes:
Alt text is required by web accessibility standards (WCAG) for non-decorative images. It's also legally required in many jurisdictions for public-sector websites.
Bad: alt="image of a dog"
Good: alt="A golden retriever puppy chasing a tennis ball across a lawn"
The phrase "image of" is redundant — screen readers already announce that it's an image. Describe the actual content.
The sweet spot is 8-15 words. Under 5 words is usually too vague. Over 25 words is too long for screen readers and starts wasting time.
Bad: alt="apple"
Better: alt="A glossy red Honeycrisp apple"
Acceptable: alt="A glossy red Honeycrisp apple cut in half, showing white flesh and visible seeds, on a wooden cutting board"
The "better" version is enough for most cases. The "acceptable" version is appropriate when the detail matters to the surrounding content (e.g., an article about apple varieties).
The same photo can have different correct alt text depending on context.
A photo of a couple smiling at a beach, used as:
alt="A couple smiling together at sunset on a quiet beach"alt="Tortoiseshell aviator sunglasses worn by a woman at the beach"alt="Couple enjoying a sunset beach vacation"Each describes the same image differently, focused on whatever aspect matters to the page's purpose.
If an image is purely decorative — a divider line, a background pattern, a generic stock photo that doesn't add information — it should have alt="" (empty string). This tells screen readers to skip it entirely.
<img src="divider.svg" alt="">
Common decorative images:
<img src="phone-icon.svg" alt=""> Call us)The exception: missing the alt attribute entirely. Always include the attribute, even if empty. Missing alt means "this image needs alt text and someone forgot". Empty alt means "this image is intentionally decorative".
Alt text contributes to SEO in three ways:
Google Images and Bing Images use alt text as a primary signal for what an image depicts. Well-written alt text can drive significant traffic from image search.
For an e-commerce site: a product photo with alt="brown leather messenger bag with brass buckles" is more likely to appear in image searches for those terms than one with alt="bag.jpg" or no alt text.
Google reads alt text as part of the page's content. If your article about "Italian cooking" includes images with alt text like "pasta carbonara", "homemade tagliatelle", "fresh basil and tomatoes", the alt text reinforces the page's topic.
This is a minor signal compared to body text, but it accumulates across all images on a page.
Google factors page-quality signals (including accessibility) into rankings. Pages with proper alt text on all images score better on Core Web Vitals accessibility audits. The boost is small but real.
Bad: alt="cheap shoes mens shoes best shoes 2026 affordable shoes buy shoes online"
This was effective in 2005. In 2026 it's actively harmful — Google penalizes it as spam, and screen reader users get assaulted with nonsense.
Write for humans first. SEO benefit follows naturally.
If a caption directly below the image already describes it, the alt text shouldn't repeat the same thing. Use the alt text for additional context or, if there's nothing more to add, keep it brief.
If you use the same photo on multiple pages, the alt text should still be consistent (or at least not contradictory). Search engines may compare your alt texts and treat highly varied descriptions as a signal of inconsistency.
Bad: alt="click here to learn more"
Alt text describes the image. The fact that the image is a link is communicated separately by the screen reader. Describe what the image depicts, not what happens when you interact with it.
alt="Brown leather Chelsea boots with elastic side panels"alt="Stainless steel coffee thermos with copper accent ring, side view"alt="Burgundy wool peacoat with double-breasted brass buttons"alt="Bar chart showing 3x growth in mobile traffic from 2020 to 2025"alt="Screenshot of the Settings menu in macOS Sonoma with the Privacy tab open"alt="Hand-drawn diagram illustrating the difference between TCP and UDP packets"alt="" for backgrounds, dividers, decorative flourishesCharts present a challenge — they often contain too much information to fit in 15 words. Best practice: a short alt text that describes the overall message, plus a longer description in the surrounding text or via the aria-describedby attribute.
<img src="growth-chart.svg"
alt="Line chart showing user growth from 100 to 10,000 between 2020 and 2025"
aria-describedby="growth-chart-desc">
<p id="growth-chart-desc">The chart depicts...</p>
<img> has an alt attribute (even if empty for decorative images).alt="".For more on image SEO best practices, see our complete image SEO guide. Combine good alt text with the right format and dimensions for the best search performance.