Image alt text best practices and SEO impact

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.

What alt text is

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:

  1. Accessibility: screen readers read it aloud, so users with visual impairments can understand what's in the image.
  2. Fallback: if the image fails to load, browsers display the alt text in its place.
  3. SEO: Google uses it (alongside other signals) to understand image content for image search and as context for the surrounding page.

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.

How to write good alt text

Describe what's in the image, not the image itself

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.

Be specific, but stay concise

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).

Match alt text to the image's purpose on the page

The same photo can have different correct alt text depending on context.

A photo of a couple smiling at a beach, used as:

  • Header for an article about long-distance relationships: alt="A couple smiling together at sunset on a quiet beach"
  • Product photo for sunglasses being sold: alt="Tortoiseshell aviator sunglasses worn by a woman at the beach"
  • Stock photo on a vacation booking page: alt="Couple enjoying a sunset beach vacation"

Each describes the same image differently, focused on whatever aspect matters to the page's purpose.

Decorative images get empty alt

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:

  • Section dividers
  • Generic header background images
  • Icon next to text where the text already says what the icon means (e.g., <img src="phone-icon.svg" alt=""> Call us)
  • Spacer images (which shouldn't exist in 2026, but still)

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".

SEO impact of alt text

Alt text contributes to SEO in three ways:

1. Image search rankings

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.

2. Page topical relevance

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.

3. Accessibility scores

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.

What NOT to do

Don't keyword-stuff

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.

Don't repeat the surrounding text

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.

Don't describe the same image differently on different pages

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.

Don't include "click here" or instructions

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.

Examples by image type

Product photos

  • 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"

Blog post images

  • 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"

Decorative

  • alt="" for backgrounds, dividers, decorative flourishes

Charts and infographics

Charts 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>

Alt text checklist

  1. Every <img> has an alt attribute (even if empty for decorative images).
  2. Non-decorative images have descriptive, specific alt text.
  3. Alt text is 8-15 words for most images.
  4. Decorative images have alt="".
  5. No keyword stuffing.
  6. No "image of" prefix.
  7. Same image used multiple places has consistent alt text.
  8. Complex charts have both alt and aria-describedby.

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.

Keep reading

Related articles