Guide

Alt text for images: how to write it properly

By Marcus B. Holzhauer · 15 October 2026 · Last updated on 16 October 2026

What alt text is for

Screen readers read the alt text aloud. It also appears when an image fails to load. Search engines use it to understand the content of an image. That makes it part of both accessibility and findability.

How to write it

  • Describe what can be seen in one short sentence or phrase.
  • Mention what matters in context.
  • Leave out “image of …” or “photo of …”.
  • Do not string together search terms.

Examples

  • Weak: “Heating Stuttgart cheap heating installation”
  • Better: “Fitter installing a heat pump in the basement of a detached house”

When the alt text stays empty

Purely decorative images that carry no information get an empty alt attribute, so that screen readers skip them.

Which images need what

Not every image needs the same effort. The decision depends on the image’s job:

  • Informative images (product photo, team photo, building-site picture): Describe what can be seen and what matters for the context.
  • Images used as a link or button (such as a logo that leads to the home page): The alt text names the destination or function, for example “To the home page”, not the appearance.
  • Diagrams and graphics: Briefly state the key message; details belong in the text alongside.
  • Pure decoration (decorative lines, background patterns): empty alt attribute.

Comparison by example

A photo shows a member of staff in a workshop checking a workpiece with a gauge. On a page about quality assurance, “Employee checking a workpiece with a gauge in the workshop” fits. On a team page, “Sabine Beispiel, workshop manager” would make more sense, because there the person is the information. So the same image can get different alt text depending on the page.

Common mistakes

  • Missing attribute: A screen reader may then read out the file name, such as “IMG underscore 4711 dot jpg”. An empty attribute is better than none at all.
  • Too long: More than one or two short sentences is too much when read aloud. As a rough guide, up to about 125 characters, but brevity is what counts.
  • Forgetting text in the image: If an important statement appears in the image, it has to be in the alt text or, better, as real text on the page.
  • Duplication: If the caption already describes the image, short or empty alt text is enough.

Checking and improving

Go through your most important pages and have the alt texts displayed, for example using the browser’s developer tools. A practical test: read the alt texts on a page one after another, without seeing the images. If they give an understandable impression, you are fine. Since 28 June 2025, the German Accessibility Strengthening Act (BFSG) has applied to certain products and services, such as online retail; micro-enterprises are exempt for services. For more, though this is no substitute for legal advice, see Accessibility and the BFSG.

Alt text and image search

Alt text is only one of several signals that search engines use for images. Others include the text around the image, the file name and the page as a whole. Precise, natural alt text supports this, but does not replace good context. If you place images at the right point in the text and describe them factually, you automatically do the right thing for users and search alike.

File names and size

Descriptive file names help as well. Images should not be larger than necessary, which keeps loading times down. See Improving Core Web Vitals.

Questions about “Alt text for images”?

Briefly describe your case; we will reply personally and honestly, even if the answer is “you don’t need that”. Our service for this: SEO & GEO.

Book an initial consultation