Junge Frau sitzt vor dem ComputerFoto von Annie Spratt auf Unsplash

How to write an image alt text that helps both users and search

09.10.2026 - Josho Brouwers in Web Design

Every image on your website can carry a short piece of text that most visitors never see. It’s called alt text, short for “alternative text”. It’s one of the most easily overlooked parts of a website.

Yet, alt text does two important things: it makes your images accessible to people who cannot see them, and it helps search engines understand what your pages are about.

You should avoid having no alt text at all (with some exceptions), alt text that just repeats the file name, or alt text crammed with keywords in the hope of pleasing Google.

Good alt text takes just seconds to write, but it makes a real difference to who can use your website and how well search engines understand it. In this article, we’ll explain who alt text is for, how to write it well, and which common mistakes to avoid.

Who reads alt text?

“Alt text” is an attribute of an image. A webpage consists of so-called HTML code – technically, a markup language – that tells a browser what it’s supposed to look like. An image is added to a page using a particular “tag”, in this case, . Alt text is an attribute of this tag, just like the URL of the image is. A full tag could look like this:

<img src="path/image.jpg" alt="The alt text goes here" />

Do not confuse the alt text with another attribute you may have come across: title. The title attribute on images shows up as a small tooltip when you hover over the image with a mouse. It’s not a substitute for alt text: screen readers don’t reliably read it out, and on phones and tablets, it’s never shown at all.

The alt text gives a short description of the image. We’ll talk about best practices when it comes to the description later; for now, we’ll focus on who benefits from adding alt texts to the images on your web pages. In brief, there are three main audiences.

The first and most important are people who are unable to actually see the image. Blind visitors and many with low vision typically use screen readers, which read the content of a page out loud. When a screen reader reaches an image, it reads the alt text. Without it, the visitor either hears nothing or, worse, only gets the file name, something like “IMG underscore 1234 dot JPG.”

The second audience is anyone whose images don’t load: a visitor on a poor mobile connection, someone who has disabled images to save data or bypass tracking via images, or a browser that encounters a broken link. In these cases, the alt text is displayed in place of the image, so that the visitor still gets an idea of what it is that they’re looking at.

The third audience is software. Search engines can analyse images to some degree, but alt text remains one of the clearest signals of what an image shows and why it’s on the page. Google explicitly uses it to understand images and rank them in image search. Increasingly, AI tools and agents that browse websites on behalf of users rely on the same information. For LLMs, which could – and do – analyze images, alt text gives them a reliable, cheap, author-intended signal.

The good news is that all three audiences want the same thing. Alt text that works well for a screen reader user is also exactly what a search engine or an LLM will find most useful.

Describe the purpose, not just the picture

The most important principle is that alt text should convey what the image means in its context, not simply list what it shows. The same photo can need a different alt text depending on where it appears.

Take a photo of a team member standing in an office. On your “About us” page, where it accompanies a short biography, “Marianne Mustermann, project manager” is probably all that’s needed. On a job advertisement that emphasises your workplace, “Marianne Mustermann working at a standing desk in our bright, open-plan Vienna office” tells the visitor something relevant about the job.

Sometimes, an image contains text: a banner, a photo of a placard held up at a protest, some other kind of signage. In these cases, when the image is (mostly) about the text that is visible, it’s very important to literally transcribe the text in the image. An alt text could read, “Road sign that reads: ‘Example Street, 3rd District’”. In some cases, just transcribing the text alone might be sufficient, e.g.: “Save 10% on ACME Life Insurance. Just click here.”

Of course, this is also a good reason to avoid putting important text in images in the first place. But sometimes, this cannot be avoided. If the image is an ad, there is little you can do about it. Likewise, if the web page deals with wine labels through the ages or recent campaign ads of this or that politician, you want to include the images themselves.

When it comes to writing alt text, a useful test is to imagine reading the page aloud to someone over the phone. What would you say when you reached the image? That usually makes for a good alt text.

Keep it short and specific

Alt text is not an essay. In most cases, a short phrase or a single sentence is enough. Screen reader users can’t skim, so every unnecessary word costs them time, as it is read aloud.

You may have come across the rule of thumb that alt text should stay under 125 characters. There’s no technical limit behind it, since screen readers will happily read longer text, but it’s a reasonable guide: if your alt text grows much longer than that, the details probably belong in the surrounding text instead.

Be specific, though. “Dog” is short, but “Golden retriever puppy sleeping on a sofa” is far more useful to both a visitor and a search engine. If the image is a product photo in a webshop, include the details that set it apart from other, similar images: “Women’s linen shirt in lemon yellow, front view” is much better than just “shirt”, especially since the page is likely to showcase many shirts. Again, context matters.

There’s also no need to start with “Image of” or “Picture of.” Screen readers already announce that they’ve reached an image, so the phrase simply repeats information the visitor already has. The exception is when the medium matters: “Oil painting of…” or “Screenshot of…” is informative when it matters to make sense of the page’s content.

Know when not to add any alt text

Note that not every image on a web page needs a description. Decorative images – background textures, ornamental dividers, a generic stock photo that adds atmosphere but no information – should ideally be added through CSS (the web page’s style sheet), so they do not show up in the web page’s HTML code. But if you cannot avoid adding these to your web page directly, they should be skipped by screen readers entirely.

The right way to do this is by using an empty alt attribute: alt=””. This tells screen readers to ignore the image. It’s not the same as leaving the attribute out altogether, which is what many websites do by accident. A missing alt attribute leaves the screen reader guessing, and it will often fall back to reading the file name aloud, which is not what we want.

The same applies to images that are already described by nearby text. If a photo has a caption that says everything the alt text would, repeating it just means the visitor hears it twice.

But there may be a good reason to add an alt text even when you have a caption, as in cases where the point of the caption is not to describe the image. An example is when you add an ironic caption to an image. For example, the image alt text may read, “A pileup of cars in an unknown street in Somewhere”, which is a literal description of the image itself, while the caption says, “Example of Somewhere residents’ ability to park.”

Special cases regarding alt text

Some images need a slightly different approach.

When an image is a link or a button, the alt text should describe where it leads or what it does, not what it looks like. A magnifying glass icon that opens a search field should have the alt text “Search”, not “Magnifying glass”, since in this instance we care only about its purpose, not its form. A logo in the header that links to the homepage can be “Company name – home.”

Charts, diagrams and infographics are harder, because they often contain more information than a short alt text can hold. Here, the alt text should summarise the main point (“Bar chart showing website traffic doubling between 2023 and 2025”), and the details should be available elsewhere on the page, for example in the surrounding text or a table.

What about search engines?

It’s tempting to treat alt text as an SEO field and fill it with keywords. Resist this urge! Google’s own guidelines warn against keyword stuffing in alt text, and it makes the experience noticeably worse for screen reader users, who have to suffer through gobbledygook like “web design Vienna web agency Vienna best website Vienna Austria” before they can move on.

If you’ve been reading any of our blog posts so far, this advice will feel very familiar: always write for people first. If your page is about web design in Vienna, and an image genuinely shows your team working on a website, then describing exactly that will naturally include the relevant words. That’s all a search engine needs, and people who use screen readers will thank you.

When it comes to search engines, alt text also works best alongside other signals. A descriptive file name (“linen-shirt-lemon-yellow.jpg” rather than “IMG_1234.jpg”) and relevant surrounding text both help search engines understand an image. None of them replaces the others.

Alt text in your CMS

Most content management systems have a dedicated field for alt text. In WordPress, you’ll find it in the media library; in ProcessWire and Statamic, it’s usually a description field attached to each image, which developers can make required.

One pitfall to be aware of: many systems store alt text with the image itself, so the same text appears wherever the image is used. That’s convenient, but the right alt text can, as we’ve said before, depend on context. If you reuse an image in several places, check that the alt text still fits each one, or ask your developer whether it can be overridden per use.

Several tools and plugins now offer to generate alt text automatically using AI. They can be a useful starting point, particularly for large product catalogues, but they describe what’s in the image, not why it’s there. In our experience, automatic alt text always needs a human to review it, much like automatic translations.

More than a nice-to-have

Alt text is part of the Web Content Accessibility Guidelines (WCAG), the international standard for accessible websites.

Since 28 June 2025, the European Accessibility Act (EAA) has made accessibility a legal requirement for many businesses that sell products or services to consumers in the European Union, including most B2C webshops. Microenterprises with fewer than 10 employees and an annual turnover or balance sheet total of no more than €2 million are exempt from the requirements for services, though not for products. In Austria, the EAA is implemented through the Barrierefreiheitsgesetz (BaFG).

But legal requirements aside, alt text is simply part of making your website work for everyone who visits it. It takes seconds per image, and once it becomes a habit, you’ll barely notice you’re doing it. It also forces you to think about the image and its use, and reflecting on what you make will help you become a better writer.

Not sure how accessible your website is? We’re happy to review it, from alt text to navigation and contrast, and help you fix whatever needs fixing. Get in touch.

Josho Brouwers, Entwickler

About the author - Josho Brouwers

Dr. Josho Brouwers is a full-stack developer at Resonanz Digital. He builds web applications, integrates AI solutions, and specialises in API development with Laravel, WordPress & WooCommerce