How to Write Alt Text for Images (SEO Best Practices)

You know you're supposed to fill in the alt text field. Every SEO checklist says so, every CMS nags you about it, and every accessibility audit flags the images you skipped. So you write something — usually the filename, or "image1", or a rushed sentence that just repeats the caption. It feels like a formality, so it gets treated like one.

The problem is that alt text isn't decoration for your HTML — it's the only way a screen reader user knows what's in the image, and one of the only ways a search engine understands it too. Written well, it does real work. Written as an afterthought, it does nothing for anyone and can actively confuse both audiences.

Quick Answer

Good alt text describes what's meaningfully in the image, in plain language, in under about 125 characters — without starting with "image of" or stuffing in keywords. Purely decorative images should use an empty alt attribute (alt="") so screen readers skip them. This same discipline helps both accessibility compliance and image search visibility, since search engines rely on alt text to understand content they can't visually interpret.

What actually makes alt text good?

Alt text lives in the alt attribute of an <img> tag. It's invisible on a normally loading page, but it becomes the entire experience of that image for two audiences: screen reader users, and search engine crawlers. Good alt text earns its place with a few consistent traits:

The key insight: alt text is written for a person who cannot see the image at all, not for a search engine skimming keywords. Get that audience right, and the SEO benefit follows naturally as a side effect.

Why alt text matters

Alt text sits at the intersection of accessibility and search visibility, which is why it keeps showing up on both accessibility audits and SEO checklists:

📊 Quick stat Missing or unhelpful alt text remains one of the most frequently cited failures in automated accessibility scans of the web's most visited sites — and it's usually one of the fastest issues to fix once it's identified.

Step-by-step: writing alt text that works

  1. Ask what the image is doing on the page. Is it informative, functional (like a button icon), or purely decorative? The answer decides whether it needs real alt text, brief functional text, or an empty attribute.
  2. Describe what's meaningfully visible. Focus on the details a sighted visitor would actually notice and use — subject, action, relevant color or setting — not every visual element.
  3. Keep it to one clear sentence. Target roughly 100–125 characters. If you need more detail than that, put the extra context in the surrounding body text instead of cramming it into the attribute.
  4. Skip "image of" and keyword stuffing. Go straight to the description, and never list multiple keyword variations hoping one will rank — write for the one person listening, not an algorithm.
  5. Use alt="" for decorative images. If removing the image would lose zero information, mark it decorative with an empty alt attribute rather than leaving it out or filling it with a filename.
  6. Match alt text to the image's role on that specific page. A photo reused across a gallery, a product page, and a blog post may deserve different alt text in each place, based on what's relevant there.
  7. Check it in isolation. Read the alt text alone, without seeing the image, and ask whether it would make sense to someone who can't see it at all. If it wouldn't, rewrite it.
Check your page structure too — free Use the Rebrixe Heading Hierarchy Analyzer to catch skipped or misordered headings alongside your alt text fixes.
Analyze Your Headings →

Common mistakes that waste alt text

1. Leaving it as the filename

"IMG_4821.jpg" or "product-photo-final-v2.jpg" tells a screen reader user nothing, and it tells search engines almost as little. If the alt attribute is left blank by accident rather than intentionally, most CMS platforms will fall back to the filename automatically — which is worse than no image at all for a screen reader user.

2. Keyword stuffing

Cramming multiple keyword variations into one alt attribute — "red running shoes mens athletic sneakers trainers buy online" — reads as gibberish to a screen reader and provides no additional SEO benefit over one accurate, specific description.

3. Repeating the caption word for word

If a visible caption already says "A hiker crossing a rope bridge in Nepal," identical alt text adds nothing new. Alt text and captions can describe the same image, but they serve different readers and can carry slightly different emphasis without contradicting each other.

4. Skipping decorative images entirely

Leaving the alt attribute off completely, rather than setting it to an empty string, can cause some screen readers to announce the filename or URL instead of staying silent. An explicit alt="" is the correct way to mark an image as decorative.

💡 Pro tip When in doubt, read the alt text out loud with your eyes closed and picture only the words. If it doesn't tell you what you'd need to know without seeing the image, it isn't finished yet.
Auditing a whole site's structure? The Heading Hierarchy Analyzer flags skipped H-tags in seconds, right alongside your alt text review.
Open Heading Analyzer →

Real-world alt text examples

Seeing the difference side by side makes the pattern obvious — these are the same images described poorly and described well:

Product photo
"shoe1.jpg" → "Men's navy trail running shoe, side view"
Specific
Names the product and detail a shopper actually needs.
Blog hero image
"image of mountains" → "Snow-capped peaks at sunrise in the Alps"
Contextual
Drops the redundant "image of" and adds real detail.
Decorative divider
"divider-line-graphic.png" → alt=""
Silent
Screen readers skip it instead of announcing a meaningless name.
Infographic
"chart.png" → "Bar chart: Q2 revenue up 18% over Q1"
Data-aware
Summarizes the key takeaway a sighted viewer would grasp at a glance.

The pattern is consistent: specificity and context do almost all of the work, dropping filler phrases costs nothing, and marking truly decorative images as decorative keeps the experience clean for screen reader users instead of cluttered.

Comparison: which approach actually helps?

Not every alt text habit is equally useful. Here's how the common approaches stack up:

Approach Accessibility value SEO value Effort Best for
Specific, contextual description High High Low–Medium Nearly every informative image
Empty alt ("") for decorative images High Neutral Low Dividers, backgrounds, spacer graphics
Filename left as-is None Low None Nothing — always fix this
Keyword-stuffed alt text Poor No added benefit Medium Nothing — avoid this pattern
Caption duplicated exactly Redundant Neutral Low Only when the caption is already ideal alt text
Functional alt for interactive images High Neutral Low Icon buttons, linked logos, image links

Free tool: Heading Hierarchy Analyzer

Alt text is one half of a well-structured, accessible page — heading order is the other. The Rebrixe Heading Hierarchy Analyzer scans any page and flags skipped levels, multiple H1s, and out-of-order headings, the same kind of structural issue that quietly undermines both accessibility and SEO alongside missing alt text. It runs entirely in your browser, with no account and no file limits.

Fix your heading structure in seconds

Paste in a URL or your page HTML and instantly see every heading level, out of order or missing, laid out clearly.

Open the Heading Hierarchy Analyzer →

Frequently asked questions

Alt text is a short written description attached to an image's HTML markup. Screen readers read it aloud to visually impaired visitors, and search engines use it to understand what an image shows since they cannot interpret pixels directly. This makes alt text a factor in both accessibility compliance and image search visibility.
Aim for roughly 100–125 characters, or about one short sentence. Screen readers often cut off or skip much longer descriptions, and search engines give little extra weight to alt text beyond what's needed to describe the image accurately.
No. Screen readers already announce that an image is present before reading the alt text, so phrases like "image of" or "picture of" are redundant noise. Go straight to describing what's actually in the image.
Purely decorative images — dividers, background textures, spacer graphics — should use an empty alt attribute (alt="") rather than no attribute at all. This tells screen readers to skip the image silently instead of announcing a meaningless filename.
Alt text is a minor, indirect ranking signal — it primarily helps images surface in image search results and gives search engines context about the surrounding content. Stuffing it with keywords provides no additional ranking benefit and can actually flag the page for spammy practices.
Alt text describes the image for accessibility and is invisible unless the image fails to load or a screen reader is in use. A caption is visible text displayed near the image for all readers, and a title attribute shows as a hover tooltip. They serve different purposes and shouldn't just repeat each other.
Yes. Alt text should describe the image's purpose in that specific context, not just the image itself. The same product photo might need different alt text on a category page versus a detailed spec page, depending on what information matters there.

Structure and accessibility, checked together

The Heading Hierarchy Analyzer runs entirely in your browser — no uploads, no account, no limits. Pair it with a quick alt text pass for a fully accessible page.

← Back to blogs