Alternative text – or simply alt – is an attribute of the <img> tag used in the creation of web pages using HTML. Its function is to provide alternative information about image files, which is displayed when an image cannot be loaded.

According to good website development practices, this attribute should never be left blank. This is dictated by the fact that the texts they contain are also read by screen readers used by visually impaired people. For many of them, this is the only way to know the exact content of the portal.

<img src=#” alt=”alternative text for photo”>.

Filling in alternative text also has other benefits. This is because it is one of the optimisation methods aimed at improving the position of a given website for specific queries. In this case, one of the selected keywords is usually placed in the alt attribute.

Well-written alt text can also help position a page in search results. Search engines cannot see images, but are able to read their descriptions and use them as a ranking factor. Properly written alt text can increase the chance that an image will be found by people searching for something in a similar topic.

How do you create alt text?

Here are some tips on how to create good alt text:

  1. Describe the image – alt text should describe what is in the image. Avoid generalities such as ‘image’, ‘graphic’ or ‘photo’. Describe what is in the image and how it is related to the content of the page.
  2. Use short text – alt text should be short and concise, consisting of one or two sentences. Avoid long descriptions that can dominate a screen reader’s screen.
  3. Include keywords – if possible, use keywords that are related to the content of the page. In this way, alt text can help position the page in search results.
  4. Avoid describing the appearance – alt text should not describe the appearance of the image, such as the background colour, border or shadow. Focus on describing what is in the image and how it relates to the content of the page.
  5. Don’t repeat content – if the image already has a place in the text, don’t repeat its content in the alt text. Instead, focus on additional information that is not included in the image description.
  1. Avoid keyword spamming – try to avoid excessive use of keywords in alt text. Too many keywords can be considered spammy by search engines and can harm your page positioning.
  2. Consider what is most important – when you create alt text, consider what is most important to the user. Focus on the information that is most relevant to the user, not just the image description.


Alt text is crucial for web accessibility and can help your website rank in search results. Well-written alt text should describe the image, be short and concise, include keywords and avoid describing the appearance of the image. It is worth remembering that alt text should be created with users in mind, not just search engines.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *