Skip to main content

Accessibility

How to write alt text for images on your website

Posted
October 30, 2026
5
min read

The short answer

Alt text is a short written description of an image that screen readers read aloud and browsers show if the image doesn’t load. Write it to say what the image means in that spot, usually in a sentence or less. If an image is purely decorative, give it empty alt text so screen readers skip it.

Laptop on a table in a living room, showing a web page full of photos in a grid

What is alt text?

Alt text, short for alternative text, is a description of an image stored in the image’s alt attribute. People who can’t see the image rely on it. Screen readers read it out, and browsers display it when an image fails to load.

It’s also one of the basics of accessibility. The first success criterion in the W3C’s Web Content Accessibility Guidelines (WCAG) 2.2, 1.1.1 Non-text content, says images and other non-text content need a text alternative that serves the same purpose. It’s a level A requirement, the most basic level.

Search engines use it too. Google says alt text is the most important attribute for giving it information about an image, alongside the page content around it (Google image SEO best practices).

Does every image need alt text?

Every image needs an alt attribute, but not every image needs a description. The GOV.UK Design System puts it simply: all images should include the alt attribute, even if it’s left empty (alt="").

The W3C’s alt decision tree helps you decide which images need words. In short:

  • Informative images add meaning, such as a photo of your shopfront or a product. Describe what matters.
  • Functional images do something, such as a logo that links to your homepage or an icon used as a button. Describe the action or destination.
  • Images of text should repeat the text in the image.
  • Complex images like charts need a short alt text plus the full information elsewhere on the page.
  • Decorative images add nothing a visitor would miss. Give them empty alt text.

If you leave the attribute out completely, some screen readers read out the file name instead, which is rarely helpful (W3C decorative images).

How do you write good alt text?

Think about why the image is there. The same photo might need different alt text on different pages, because what matters depends on the context. The W3C is clear that the author decides, based on the image’s purpose (W3C images tutorial).

A few rules that work for most images:

  • Be specific and concise. GOV.UK suggests no more than 2 sentences.
  • Don’t start with "image of" or "picture of". Screen readers already announce it as an image.
  • Don’t repeat what’s in the text next to it. If the caption says it, the alt text doesn’t need to.
  • Use normal punctuation, so it reads naturally when spoken.
  • Don’t stuff in keywords. Google warns this makes for a poor experience and may be seen as spam.
  • Don’t add details that aren’t in the image, such as the photographer’s name.

A good test from Webflow’s help centre: imagine describing the image to someone over the phone, or delete the image and check the alt text still makes sense in its place.

What alt text should a logo have?

It depends on what the logo does. Most logos in a site header link to the homepage, so they’re functional. The W3C recommends describing the destination rather than the logo itself (W3C functional images).

  • Before: alt="logo"
  • After: alt="Hartwell Bakery home"

If a logo sits on the page purely for identity and doesn’t link anywhere, the organisation’s name is usually enough. If it appears in a row of client or partner logos, use each company’s name.

How should you describe team photos?

Say who’s in the photo and anything that matters to the page. On an About page, a name and role is usually enough. Don’t describe what people look like unless it’s relevant.

  • Before: alt="team.jpg"
  • After: alt="Priya Shah, owner of Hartwell Bakery, shaping bread dough at the shop counter"

If the person’s name and role are already in a caption right next to the photo, you could keep the alt text shorter to avoid repeating it.

What about decorative images?

Decorative images include background patterns, dividers, and stock images used for mood that don’t add information. Give them empty alt text (alt="") so screen readers skip them (W3C decorative images).

GOV.UK also lists two common cases where empty alt text is right: an icon next to a text label that says the same thing, and an image inside a link where the image isn’t needed to understand the link.

Ask yourself: would a visitor miss anything if this image wasn’t there? If not, it’s decorative. If you’re unsure, it’s often a sign the image could go altogether.

How do you write alt text for linked images and buttons?

When an image is the only thing inside a link or button, its alt text becomes the link’s name. Describe where it goes or what it does, not what it looks like.

  • Before: alt="arrow"
  • After: alt="Next page"
  • Before: alt="magnifying glass icon"
  • After: alt="Search"

Google also uses alt text as anchor text when an image is used as a link, so a clear description helps there too.

How do you add alt text in WordPress?

In WordPress you can set alt text in two places:

  • Media Library: open the image and fill in the Alt Text field. This sets the default alt text when you insert the image elsewhere.
  • Image block: select the image in the editor, open the block settings sidebar and use the Alternative text field. This applies only to the image on that page or post (WordPress Image block documentation).

For a decorative image, use the block’s Mark as decorative option, or leave the field empty. Some themes and page builders handle this differently, so check the page source if you’re not sure.

How do you add alt text in Webflow?

Webflow gives you control at several levels (Webflow: Include alt text on images):

  • Assets panel: open the image’s settings and write a description in the Descriptive field, or choose Decorative. Every use of the image inherits this.
  • On the canvas: select an image, open Image settings and choose Custom description or Decorative to override it for that one use.
  • CMS items: add a plain text field for alt text to your Collection, then bind the image’s alt text to it, so each blog post’s hero image gets its own description.

Webflow can also suggest alt text with AI and lists images with missing alt text in its Audit panel. Treat AI suggestions as a first draft: they can describe what’s in a picture, but not why it’s on your page.

Final thoughts

Good alt text takes a few seconds per image and makes your site usable for more people. Start with the images that carry meaning or links, such as your logo, product photos and buttons, then mark the rest as decorative.

For the bigger picture, read why your website should be accessible and our UX design best practices. If you’d like a site that’s built accessibly from the start, see how we approach websites. For ongoing updates and fixes, take a look at our Website care plans, or get in touch for direct access to the people doing the work.

QUESTIONS

Frequently asked questions

How long should alt text be?

As short as it can be while still giving the meaning of the image. The GOV.UK Design System suggests no more than two sentences, and most images need only a short phrase or one sentence. If an image holds a lot of detail, such as a chart, give the full information in the page text instead.

Should I use keywords in alt text?

Only where they describe the image naturally. Google uses alt text to understand images, but it warns that filling alt text with keywords makes for a poor experience and may be treated as spam. Write for the person who can’t see the image first, and the search benefit follows.

Do decorative images need alt text?

They need an empty alt attribute rather than a description, so screen readers skip them. Leaving the attribute out entirely is not the same, because some screen readers will then read out the file name. In WordPress, use Mark as decorative or leave the field blank, and in Webflow, choose the Decorative option.

What is the difference between alt text and a caption?

Alt text is hidden from most visitors and read out by screen readers or shown when an image fails to load. A caption is visible text under the image that everyone can read. If a caption already describes the image, keep the alt text short so the same words aren’t read out twice.

Can I use AI to write alt text?

AI tools, including the one built into Webflow, can give you a useful first draft. They can describe what’s in a picture, but they don’t know why it’s on your page. Always review the suggestion and rewrite it so it explains the image’s purpose in that spot.

Related articles

More on choosing, building and running a small business website.

More on keeping your website safe, accessible and working well.

More on turning visitors into enquiries.

All articles

Accessibility

How to write alt text for images on your website

What alt text is, which images need it, and how to write it for logos, photos, links and decorative images, with before and after examples you can copy.

October 30, 2026
5
min read

WEBSITES

Want a website that works for every visitor?

Enquire now

See how we build websites

ONGOING WEBSITE CARE

Want a website that works for every visitor?

Enquire now

See how our Website care works

CRO

Want a website that works for every visitor?

Enquire now

See how our CRO works