Alt Text Examples: What to Write for Each Kind of Image

Alt text is the short written stand-in for an image, set in the alt attribute of an img tag. Screen readers read it aloud and browsers show it when the picture fails to load. Good alt text says what the image means in its place on the page; decorative images get an empty alt.

Quick examples by image type
ImageWeak altBetter alt
Logo linking to homelogoSmith Roofing home
Product photoIMG_4021.jpgBrown leather tote bag with brass buckle
Search icon buttonmagnifying glassSearch
Divider swirldecorative swirl(empty: alt="")
Photo of the teampeopleOur four roofers outside the workshop van
Sales chartchartSales by month, details in the table below

Updated

The right words depend on why the image is there, not on what it looks like. A magnifying glass inside a button means Search; the same shape as a page decoration means nothing at all. Try the practice questions, then copy the patterns for your own shop or site.

Practice: pick the best alt text

Your logo sits in the header and links to the home page. Your business name is not written anywhere else in the header.

A thin wavy line separates two sections. It adds no information.

The main photo on a product page for a mug that comes in three colours. This is the sage green one.

A button with only a cart icon opens the shopping cart.

A banner image with the words Free delivery this weekend. The same words are not on the page as text.

0 of 5 answered correctly.

Start again

More examples for shop and business sites

Alt text examples for common business images
Where the image isExample alt textWhy
Hero photo of a cafe interiorSunny cafe counter with fresh pastries on displaySets the scene in a few words
Headshot on an About pageDr. Amira Khan, lead dentistName and role, not hair colour
Social icon linking to InstagramHarbour Bakery on InstagramDescribes the link target
Map screenshot with your address next to it(empty: alt="")The address is already text nearby
Before and after photo of a repaired roofRoof before repair, with missing tiles at the ridgeSays what changes between the photos
Certificate badgeCertified by the regional trade councilSays what the badge certifies

Code examples

Three common cases in HTML

A linked logo, a product photo and a decorative image. Note the decorative one still has the alt attribute, just empty.

<a href="/">
  <img src="/logo.svg" alt="Harbour Bakery home" width="160" height="40">
</a>

<img src="/mug-sage.jpg" alt="Sage green stoneware mug with a curved handle">

<img src="/wave.svg" alt="">

A chart with its data in text

The alt names the chart and points to the details, which sit in a caption that every visitor can read.

<figure>
  <img src="/sales.png" alt="Monthly sales chart, described below">
  <figcaption>Sales rose from 120 orders in March to 210 in June.</figcaption>
</figure>

The W3C decision tree in plain words

First, does the image contain text? If that text also appears nearby as real text, use an empty alt; if not, put the text in the alt. Next, is it inside a link or button? Then describe where the link goes or what the button does.

Does it add meaning? Give simple photos a brief description, and for graphs put the data elsewhere on the page. Is it only decoration? Use an empty alt.

Alt text for online stores

Shoppers who use screen readers rely on product image alt text the way others rely on zooming in. When a product has several photos, make each alt different: front view, back pocket detail, worn by a model who is 170 cm tall.

How it works

  1. Read the situation in each practice card: what the image shows and where it sits on the page.
  2. Choose the alt text you would write from the three options.
  3. The card tells you whether that choice works and which step of the W3C decision tree applies.
  4. Use the table of examples below as a reference when you add images to your own pages.

Tips

Frequently asked questions

What does alt mean in text?

Alt is short for alternative. Alt text is the alternative text for an image: the words a screen reader speaks, and what the browser shows in place of a picture that cannot load. It lives in the alt attribute of the img element.

Should every image have alt text?

Every img should have an alt attribute, but not every one needs words. MDN explains that an empty alt marks an image as not a key part of the content. Leaving alt off entirely is worse: some screen readers then read out the file name.

How long should alt text be?

Short enough to say in one breath for most images. The W3C tree asks for a brief description of simple photos. Charts and diagrams are the exception: give a short label in alt and put the full information in text on the page.

Does alt text help SEO?

Yes. Google's image guide says it uses alt text along with computer vision and page content to understand images. Its own example prefers Dalmatian puppy playing fetch over a bare puppy, and warns against keyword lists.

What alt text should a logo have?

If the logo links to your home page, the alt should describe where the link goes, such as your business name plus home. If it is just shown and your name already appears as text beside it, an empty alt is fine.

Related: Image alt text generator, On-page SEO checklist, Social media image sizes, Ecommerce SEO guide.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.

Product

Who It's For

Features

Resources

Company

View Sitemap