What is Alt Text? The Complete Guide to Image Alt Text

Everything you need to know about alt text: what it is, why it matters for accessibility and SEO, how to write it well, and real examples you can follow.

Bradley White

· 13 min read

Digital graphic showing how alt text works: a photo of a golden retriever puppy on a park bench with the HTML alt attribute reading 'A golden retriever puppy sitting on a wooden park bench,' a screen reader icon on the left, and a search engine bot icon on the right

Every image on the web tells a story, but only if you can see it. For the 2.2 billion people worldwide living with a vision impairment, for Google's crawlers indexing your pages, and for anyone on a slow connection where images fail to load, alt text is what makes images accessible to everyone.

If you build websites, write content, run an online store, or manage digital assets, understanding alt text is not optional. It is a core part of making the web work. This guide covers everything: what alt text is, why it matters, how to write it well, and common mistakes to avoid.

Summary

Alt text is a short text description added to an image's HTML code. It enables screen readers to describe images to visually impaired users, helps search engines understand and rank your images, and provides fallback text when images fail to load. Good alt text is specific, concise (typically one to two sentences), and considers the context the image appears in. Decorative images should use empty alt text (alt=""). Missing alt text is the most common accessibility violation on the web and can expose businesses to legal risk under the ADA, the European Accessibility Act, and similar legislation.

What is alt text?

Alt text (short for "alternative text") is a written description of an image that is added to the HTML code of a web page. It serves as a text substitute when the image cannot be seen, whether by a person using a screen reader, a search engine crawler, or a browser that failed to load the image.

In HTML, alt text is defined using the alt attribute on the <img> tag:

<img
  src="golden-retriever.jpg"
  alt="A golden retriever puppy sitting on a park bench"
/>

The alt text is not visible on the page under normal conditions. It lives in the code and is read aloud by assistive technology, displayed when images break, and parsed by search engines to understand what an image shows.

Why alt text matters

Alt text is not just a nice-to-have. It is a foundational requirement for web accessibility, a direct ranking signal for search engines, and increasingly a legal obligation.

Accessibility

Screen readers (software that reads web content aloud for people who are blind or have low vision) rely entirely on alt text to convey what an image shows. Without it, the screen reader either skips the image entirely or reads the file name, which is almost never helpful.

Imagine hearing "image_DSC04872_final_v2.jpg" instead of "Team photo at the 2026 company retreat." Alt text turns an unusable experience into a meaningful one.

Search engine optimization (SEO) and Generative Engine Optimization (GEO)

Search engines cannot "see" images the way humans do, and neither can AI tools like ChatGPT, Gemini, or Perplexity. Both rely on alt text to understand what an image depicts. As AI-powered search grows alongside traditional search, descriptive alt text now influences how your content performs across all of them:

  • Google Image Search rankings: descriptive alt text helps your images surface in image search results, driving additional organic traffic.
  • Page context: alt text gives Google more information about the page's topic, which can improve the page's overall search relevance.
  • Featured snippets: images with strong alt text are more likely to appear in featured snippets and rich results.
  • AI-generated answers: generative AI tools crawl and synthesize web content to answer user queries. Descriptive alt text helps these models understand, index, and cite your images, making your content more likely to appear in AI-generated responses. Learn more in our guide to Generative Engine Optimization (GEO).

Legal compliance

Web accessibility is a legal requirement in many jurisdictions. In the United States, the Americans with Disabilities Act (ADA) has been interpreted by courts to apply to websites. In 2024 alone, over 4,000 web accessibility lawsuits were filed. The European Accessibility Act, which took effect in June 2025, applies to businesses selling to EU consumers. Missing alt text is one of the most commonly cited violations.

Broken image fallback

When an image fails to load (due to a slow connection, a CDN outage, or a broken URL), the browser displays the alt text in its place. Good alt text ensures that the page's meaning is preserved even when the image is missing.

How to write good alt text

Writing good alt text is a skill, but it is not difficult once you know the principles. Here are the guidelines that accessibility experts and search engines agree on.

1. Be specific and descriptive

Describe what the image actually shows. Vague descriptions like "a photo" or "an image of a thing" do not help anyone. Instead of "dog", write "A golden retriever puppy sitting on a wooden park bench."

2. Keep it concise

Aim for one to two concise sentences. There is no hard character limit. The commonly cited 125-character rule comes from older screen reader limitations, not a technical standard. Focus on describing the image's purpose efficiently. If an image requires extended explanation (like a chart or infographic), put the detailed description in the surrounding text and use the alt text to summarize.

3. Consider the context

The same image can need different alt text depending on where it appears. A photo of a coffee cup on a product page should describe the product ("White ceramic mug, 12 oz, with matte finish"), while the same photo in a blog post about morning routines might say "A cup of black coffee on a kitchen counter at sunrise."

4. Do not start with "image of" or "photo of"

Screen readers already announce that an element is an image. Starting your alt text with "image of" is redundant. The user hears "Image: image of a dog", which is repetitive. Jump straight into the description.

5. Use empty alt text for decorative images

If an image is purely decorative (a background pattern, a visual divider, or an icon next to text that already says the same thing), use an empty alt attribute: alt="". This tells screen readers to skip the image entirely rather than announcing something unhelpful.

6. Include relevant keywords naturally

If a keyword fits naturally into the description, include it. For example, "Wireless Bluetooth headphones with noise cancellation on a desk" is both accurate and SEO-friendly. Never stuff keywords. Google penalizes it and screen reader users find it confusing.

Alt text examples: good vs. bad

The best way to learn alt text is to see it in action. Here are real-world examples across common image types.

Product photos

Bad

alt="shoe"

Good

alt="Nike Air Max 90 in white and grey, men's running shoe, side view"

Why: Product alt text should include the brand, product name, key attributes (color, size), and the angle or view, the same details a shopper needs.

Charts and infographics

Bad

alt="chart"

Good

alt="Bar chart showing website traffic grew 40% after adding alt text to all product images over 3 months"

Why: For data visualizations, describe the key takeaway or trend rather than every data point. The alt text should convey the same insight a sighted user gets at a glance.

Decorative images

Bad

alt="blue decorative divider line"

Good

alt=""

Why: Purely decorative images that add no informational value should use empty alt text. This tells screen readers to skip the image rather than announcing something useless.

Functional images (buttons, links)

Bad

alt="icon"

Good

alt="Search"

Why: When an image functions as a button or link, the alt text should describe the action, not the image. A magnifying glass icon used as a search button should say "Search," not "magnifying glass icon."

How does your site measure up?

Wondering how many of your images are missing alt text right now? Our free accessibility audit scans any page and shows you exactly which images need attention.

Audit your site's alt text

Alt text and SEO

Google has been explicit: alt text is one of the most important factors for ranking in Google Image Search. But its SEO value extends beyond images.

How search engines use alt text

  • Image indexing: Alt text is the primary way Google understands what an image shows. Without it, your images are effectively invisible to image search.
  • Page relevance: Alt text contributes to the overall topic signal of a page. If your page is about "wireless headphones" and your images have alt text describing wireless headphones, that reinforces the page's relevance for that query.
  • Anchor text equivalent: When an image is wrapped in a link, the alt text functions as anchor text, giving Google context about the linked page.

SEO best practices for alt text

  • Include your target keyword naturally, but only if it accurately describes the image.
  • For ecommerce, include the product name, brand, and distinguishing attributes.
  • Do not stuff keywords. "shoes sneakers running shoes athletic shoes buy shoes" is spam and Google will ignore or penalize it.
  • Every image on the page should have unique alt text. Duplicating the same description across multiple images wastes an opportunity.

Alt text and WCAG compliance

The Web Content Accessibility Guidelines (WCAG) are the international standard for web accessibility. Alt text falls under WCAG Success Criterion 1.1.1: Non-text Content, which is a Level A requirement (the minimum level of conformance).

In plain language, WCAG 1.1.1 requires that all non-text content (images, icons, charts, audio, video) has a text alternative that serves an equivalent purpose. Here is what that means for different image types:

  • Informative images: Must have alt text that conveys the same information as the image.
  • Functional images: Must have alt text that describes the function (e.g., "Submit form," "Go to homepage").
  • Decorative images: Must have empty alt text (alt="") so they are skipped by assistive technology.
  • Complex images: Charts, diagrams, and infographics need a short alt text summary plus a longer text description nearby or linked.
  • Images of text: The alt text must contain the same text that appears in the image.

Missing alt text is consistently the most common WCAG violation found on the web. The WebAIM Million study, which audits the top one million home pages annually, has found that over one-third of all images are missing alt text every year since the study began.

Common alt text mistakes

Knowing what to avoid is just as important as knowing what to do.

1

Leaving alt text empty on informative images

The most common mistake. If an image conveys information, it needs a description. An empty alt="" should only be used on truly decorative images.

2

Using the file name as alt text

"IMG_4032.jpg" or "hero-banner-final-v3.png" tells the user nothing about what the image shows.

3

Keyword stuffing

Writing "best cheap running shoes buy running shoes online discount running shoes" is spam. It hurts SEO and is hostile to screen reader users.

4

Starting with "image of" or "picture of"

Screen readers already announce that the element is an image. The prefix is redundant and wastes the reader's time.

5

Writing alt text that is too long

Very long alt text can be difficult for screen reader users to navigate. Keep descriptions focused on the most important information; one to two sentences is usually enough.

6

Using the same alt text for every image

Every image on a page should have unique, specific alt text. Duplicating descriptions defeats the purpose and signals low quality to search engines.

Using AI to generate alt text

Writing alt text by hand is the gold standard, but it does not scale. An ecommerce store with 10,000 product images, a news site publishing dozens of articles a day, or a government agency digitizing years of archived content cannot realistically hand-write every description.

This is where AI-powered alt text generation tools can help. Modern vision models can analyze an image and produce accurate, natural-sounding descriptions in seconds. The best approach is to use AI as a starting point and then review and refine the output.

Generate alt text with Alt Text Studio

Alt Text Studio uses leading AI vision models to generate accurate, descriptive alt text for your images. Upload one image or hundreds, generate descriptions in any of 194 languages, add SEO keywords or product context, and export in CSV, JSON, HTML, or plain text.

Frequently asked questions

What is alt text in HTML?

Alt text in HTML is the value of the alt attribute on an <img> tag. It provides a text description of the image for screen readers, search engines, and situations where the image cannot be displayed.

How long should alt text be?

Aim for one to two concise sentences. The commonly cited 125-character limit comes from older screen reader behavior, not a hard technical rule. Focus on describing the image's purpose efficiently. Keep it brief, but don't sacrifice clarity just to hit a character count.

Does alt text help SEO?

Yes. Alt text is a confirmed Google ranking factor for image search. It also contributes to the overall topic relevance of the page, which can improve regular search rankings. Google has explicitly recommended using descriptive alt text in its SEO documentation.

When should I use empty alt text?

Use alt="" when an image is purely decorative, such as background patterns, visual spacers, or icons that duplicate adjacent text. This tells assistive technology to skip the image.

Is alt text required by law?

In many jurisdictions, yes. The ADA (US), European Accessibility Act (EU), Accessibility for Ontarians with Disabilities Act (Canada), and similar laws in other countries require digital content to be accessible. Missing alt text is one of the most frequently cited violations in accessibility lawsuits.

Can AI write good alt text?

Modern AI vision models produce high-quality alt text that is accurate and natural-sounding. AI is especially valuable for large-scale projects where hand-writing every description is impractical. The best approach is to use AI-generated alt text as a starting point and review it for accuracy and context.

Start generating alt text today

Every image without alt text is a missed opportunity: for accessibility, for SEO, and for the people who depend on text alternatives to use the web. Whether you write alt text by hand or use AI to help, the important thing is to start.