Alt Tag

An alt tag is the alt attribute on an image in HTML. Strictly speaking it's an attribute rather than a tag, so you'll also hear it called alt text. It gives a short text version of the image that screen readers read out, and that shows if the image fails to load.

How screen readers use alt text

Someone using a screen reader hears the alt text in place of the image. Not every image needs a description, though. A product photo should say what it shows, such as "Fitted oak kitchen with a central island and brass handles". A decorative divider should have an empty alt, written as alt="", so screen readers skip it.

If the image is a link, the alt text is often all they hear about where that link goes. When an image has no alt attribute at all, many screen readers read out the file name instead, which rarely helps anyone. An image used as a button needs alt text that says what the button does, such as "Search" or "Go to basket".

Alt text and empty alts on our own site

Two parts of our own site show both sides of alt text, a description where it helps and an empty alt where it doesn't.

  1. Our site header
    <a href="/" class="brand" aria-label="Bird Marketing home"> <Image src="/media/88df10db6c-bird-logo-white.webp" alt="Bird Marketing"
    The logo says who we are

    Our logo in the header is an image, so its alt text gives the company name. The link around it has its own label too, so a screen reader announces it as the way back to the homepage.

  2. Our case study card
    <Image image={project.thumbnail || project.image} alt=""
    The screenshot is skipped

    Each case study card is a link that already names the client and shows a result. The screenshot on the card is there to look at, so it has an empty alt and screen readers move straight past it.

Writing a good alt tag

Describe what the image shows and why it's on the page. A short phrase or a sentence is usually enough. Leave out "image of" or "picture of", as screen readers already announce that it's an image.

Context matters too. The same photo of a kitchen might need different alt text on a product page and on a blog post about lighting. Think about what someone would miss if they couldn't see it.

Alt tags and SEO

Google uses alt text, along with the words around an image, to understand what the image shows. That helps it appear in Google Images and can support the page it sits on. Stuffing alt text with keywords doesn't help, and Google can treat it as spam. Write it for people first, and the search benefit usually follows.

More technical SEO glossary terms

These technical SEO glossary terms cover crawling, indexing, redirects, sitemaps, structured data and page speed. Each definition shows the idea in a diagram and gives a practical example, so developers, marketers and site owners can talk about the same fix in the same words.