Accessibility

How to write good alt text

Describe what the image conveys in the context it appears, in one sentence. Skip "image of" — the screen reader already says it is an image. Decorative images take alt="" so they are announced as nothing at all.

Written by Anas Bin Masud 7 steps About 20 minutes 268 words

Before you start

  • Your images and the pages they appear on

The steps

  1. Step 1: Ask what the image is doing there

    Informative, decorative, or functional. The answer determines everything else.

  2. Step 2: For informative images, describe the information

    Not the pixels. "Sales rose 40% between January and June", not "a line chart".

  3. Step 3: For decorative images, use alt=""

    An empty attribute, not a missing one. Missing alt makes screen readers read the filename.

  4. Step 4: For functional images, describe the action

    A magnifying glass that submits search gets alt="Search", not alt="magnifying glass".

  5. Step 5: Keep it to a sentence

    Long descriptions belong in a caption or adjacent text where everyone can read them.

  6. Step 6: Do not stuff keywords

    It is spam, it is useless to the person listening, and it is trivially detected.

  7. Step 7: Test with a screen reader

    NVDA on Windows and VoiceOver on Mac are both free. Ten minutes changes how you write alt text permanently.

Context changes the correct answer

The same photograph of a building needs different alt text on an architecture page than on a contact page. On one it is the subject; on the other it is decoration. There is no correct alt text independent of the page.

The SEO angle is real but secondary

Alt text is how image search understands the image, so it does have ranking value. Write it for the person listening and the search benefit follows; write it for search and it serves nobody.

The background behind this

Image SEO: findable images that do not wreck your page speed covers the reasoning in about 3 minutes — free, ungated, written from client work.

Who wrote this

Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada, Ireland and Pakistan. These procedures are the ones I run on client work, written down rather than invented — including the ones where the honest answer is that the fix is not available on your current hosting.

Related procedures

All 64 how-to guides →

Want this done rather than done yourself?

Send the brief and you get a reply within one business day — either questions, or a scoping call. If your project is not something I should take on, I will say so then.

Response
Replies within 1 business day
Hours
Mon–Fri, 09:00–18:00 PKT — overlaps 05:00–14:00 UK, 00:00–09:00 US Eastern
Booking
Booking projects from October 2026
WhatsApp — opens a chat with +92 346 5348466 in a new tab