How to Write Alt Text: A Practical Guide with Examples

By accessibilitywebsite.com teamApril 29, 2026Updated June 10, 20267 min read

Good alt text conveys the purpose of an image in a sentence or less. The trick is matching the description to the image's role — informative, functional, or decorative — and knowing when to leave alt empty.

Alt text (the alt attribute) is what a screen reader announces in place of an image, what shows when an image fails to load, and a genuine SEO signal. Missing or poor alt text is one of the most common — and most easily detected — accessibility failures, which is exactly why it shows up in so many lawsuits.

The core rule: describe purpose, not pixels

Ask what the image communicates in context. A photo of a product on a product page needs the product's name; the same photo as a decorative background needs nothing. Describe the function or information, not every visual detail.

Informative images

These convey content. Describe the essential information concisely.

  • Good: alt="Bar chart showing sales doubling from 2024 to 2026"
  • Weak: alt="chart" or alt="image of a chart"

Functional images

These do something — a logo that links home, an icon button. Describe the action or destination, not the graphic.

  • Good: alt="Search" on a magnifying-glass button
  • Good: alt="Acme home" on a logo that links to the homepage

Decorative images

Spacers, background flourishes, and icons that merely repeat adjacent text add no information. Give them an empty alt (alt="") so screen readers skip them — never omit the attribute entirely, or some readers will announce the file name.

Practical do's and don'ts

  • Keep it concise — aim for under ~150 characters; use a caption or nearby text for longer descriptions.
  • Don't start with "image of" or "picture of" — the screen reader already says it's an image.
  • Don't stuff keywords; write naturally for a human listening.
  • For complex images (charts, diagrams), provide a short alt plus a longer description nearby.
  • If text is inside the image, include that text in the alt.
A scanner can tell you an image is missing alt text. Only a human can tell you whether the alt text is actually meaningful — so do both.

accessibilitywebsite.com flags every image missing alt text during a scan and helps you generate sensible descriptions, so you can clear this category quickly and review the wording for accuracy.

Frequently asked questions

How long should alt text be?
Keep it concise — generally under about 150 characters. If an image needs a longer explanation (like a chart), pair a short alt with a fuller description in nearby text or a caption.
What alt text should decorative images have?
Use an empty alt attribute (alt="") so assistive technology skips the image. Omitting the attribute entirely can cause some screen readers to read out the file name.
Should I start alt text with 'image of'?
No. Screen readers already announce that the element is an image, so phrases like 'image of' or 'picture of' are redundant. Describe the content or function directly.

See where your site stands — free

Run an instant WCAG 2.2 AA scan and get a severity-ranked report with AI fix suggestions in seconds. No overlay, no false promises.