How to write good “alt-text” for an image


Alt text, or alternative text, is the text that describes an image on a web page. It is used by screen readers to help people who are blind or have low vision understand the content of an image. Search engines also use alt text to index images, which can help your website rank higher in search results.

Here are some tips for writing meaningful alt text:

  • Be descriptive. Alt text should describe the image in detail, including the subject, action, and setting.
  • Be specific. Don’t use general terms like “image” or “photo.” Instead, use specific words and phrases to help people understand the image.
  • Be objective. Don’t add your own opinions or interpretations to the alt text.
  • Be concise. Alt text should be short and to the point. Aim for 100 characters or less.
  • Use keywords. If you want your website to rank higher in search results, include relevant keywords in your alt text.

Here are some examples of good alt text:

  • Image of a man sitting at a computer: “A man in a blue shirt is sitting at a computer desk. He is typing on the keyboard.”
  • Image of a woman holding a baby: “A woman in a red dress is holding a baby in her arms. The baby is smiling.”
  • Image of a group of people playing soccer: “A group of people are playing soccer on a field. The players are wearing different colored jerseys.”

Here are some examples of bad alt text:

  • Image of a cat: “Image of a cat.”
  • Image of a sunset: “Photo of a sunset.”
  • Image of a product: “Product image.”

As you can see, good alt text is clear, concise, and descriptive. It provides enough information for people who are blind or have low vision to understand the content of an image. It also helps search engines index images, which can help your website rank higher in search results.