ALT attribute

ALT attribute in images

ALT attribute, also known as alt text, is an HTML element used to describe the content of images on web pages. It is extremely important for both users and search engine crawlers like Google.

The meaning of the ALT attribute

1. Availability

The ALT attribute ensures that people using screen readers can understand the content of an image when it is not displayed for some reason. This is crucial for users who are blind or have low vision.

2. SEO

For search engine robots, which "don't see" images but interpret text, the ALT attribute provides information about the image's content. A well-formulated ALT text containing relevant keywords can significantly improve a page's positioning in search results.

3. Failure rate

In situations where an image cannot load for some reason (e.g. due to a slow internet connection or errors on the page), the ALT text is displayed in place of the image, informing the user about its content.

How to use the ALT attribute effectively?

  • Describe precisely: ALT text should accurately describe what's being depicted in the image. The description should be short but informative enough.
  • Use keywords: Incorporating relevant keywords into your ALT text can help you optimize your images for SEO, but it needs to be done skillfully to avoid over-optimizing.
  • Be concise: Avoid over-description and focus on the most important elements of the image.

Examples of good practices

Sample image: Photo of a coffee mug on a desk.

  • Weak ALT text: picture
  • Better ALT text: A cup of white coffee on the desk
  • Best ALT text: A cup of white coffee on a desk next to a laptop and notebook

Using the ALT attribute not only improves the accessibility and SEO of your page, but also provides a better user experience when images are not available for some reason.

Get a free quote

Selected definitions: