Bajorat Media

What is an ALT attribute?

The ALT attribute provides alternative text for an image and matters for accessibility, image understanding and SEO.

The ALT attribute is an HTML attribute for images that provides alternative text. This text is used when an image cannot be loaded and can be read by screen readers. It also helps search engines better understand the content and purpose of an image.

In HTML, it looks like this:

<img src="/image.webp" alt="Description of the image content" />

ALT attribute or alt tag?

People often say alt tags. Technically, the correct term is the alt attribute on the img element. This distinction matters when developers, editors and SEO specialists discuss actual HTML quality.

Which images need which alt text?

Not every image needs a long description. The purpose in context decides:

  • informative images need a useful description
  • linked images need alt text that explains the link purpose
  • infographics need a text equivalent of the key message
  • decorative images can use an empty alt=""

The W3C Web Accessibility Initiative provides a practical alt decision tree for making this decision.

Importance for accessibility and SEO

For accessibility, the ALT attribute is important because visual information should also be available without the image. For search engine optimization, it adds context and supports image search. It should not be abused for keyword stuffing.

Good alt text is short, specific and context-aware. It describes what matters for the user, not what the author wants to repeat as a keyword.

Discuss a project

Do you want to apply this topic to your project?

We help you decide which technical, editorial or strategic steps make sense for your website - and what truly has priority.