Image alt text: what to write, with examples

Last updated

The short answer

Alt text is the short description you give an image, so people who can't see it, and search engines, know what it shows. Write what the picture shows and why it is on this page, in one short sentence: "Technician fitting a tankless water heater in a garage", not "IMG_4821.jpg" or "image". Leave it empty (alt="") for pictures that only decorate. Don't start with "image of", and don't stuff it with keywords.

What alt text is

Most pictures on a web page are added with an <img> tag, and its alt attribute holds a text version of the picture:

<img src="tankless-install.jpg"
     alt="Technician fitting a tankless water heater in a garage">

<!-- A decorative divider: empty alt, so screen readers skip it -->
<img src="wave-divider.svg" alt="">

You rarely type that by hand: every website builder has an "alt text" or "image description" box for each picture. The words go in that box.

Pictures can also be set as a background in the page's design, or drawn as an SVG. Those have no alt box, so a background that carries meaning, such as a banner with your offer written on it, needs the same words on the page or another text alternative your developer adds (W3C images tutorial).

Why it matters

How to write it

Examples: weak and better

PictureWeakBetter
A finished bathroom on a remodeler's siteIMG_4821.jpgWalk-in shower with gray tile and a glass door, after our remodel
The owner at the front desk of a bakeryphotoMaria, the owner, at the counter of our Main Street bakery
A product photo in an online storecandle candles soy candle gift candleLavender soy candle in an amber glass jar
A team photo on an accountant's siteimage of peopleOur five accountants outside the office in Columbus

Logos, links, buttons and decoration

W3C sorts images into a few kinds, each with its own rule (W3C images tutorial), and its alt decision tree walks you to the right one:

How to add it on your platform

Image alt text is one part of making a site work for everyone; the accessibility guide covers the rest, from color contrast to form labels.

How the scan checks it

Checklist

Questions people ask

What is alt text?
A short written description of an image, stored in the image's alt attribute. Screen readers read it aloud to blind visitors, browsers show it when the picture fails to load, and search engines use it to understand what the picture shows.
How long should alt text be?
As short as it can be while still saying what the picture shows in this context: usually one short sentence or a phrase. There is no official character limit. If a picture needs a paragraph, such as a chart, give a short alt text and put the full detail in the page text.
Does alt text help SEO?
Yes. Google says it uses alt text, together with the page around the image, to understand what an image is about, and alt text on a linked image works like the link's words. Write it for people first; Google warns against stuffing it with keywords.
Should every image have alt text?
Every img tag needs an alt attribute, but not every one needs words in it. A picture that only decorates, like a background pattern or a divider, should have an empty alt (alt="") so screen readers skip it.
Should I start with 'image of' or 'picture of'?
No. Screen readers already announce that it is an image, so 'image of' only adds words. Start with what it shows.

What the free scan checks for this

These are the FocalScore checks that cover this guide's subject. Each one in your report says what it found, shows the evidence and gives the fix.

Sources

Last checked . Documentation, settings and rules change; if one of these pages now says something different, it is right and this guide is out of date. Tell us at info@focalscore.com.

  1. W3C WAI: Images tutorial
  2. W3C WAI: An alt decision tree
  3. W3C WAI: Understanding Success Criterion 1.1.1 Non-text Content
  4. Google Search Central: Google image SEO best practices
  5. WebAIM: Alternative text