Alt (alternative) text, is an attribute added to images in HTML code that serves a purpose for web accessibility and search engine optimisation (SEO). Primarily, it provides a description of an image for users who are visually impaired and rely on screen readers to understand content. Adding alt text ensures all users can access information regardless of their disabilities.
In addition to accessibility, alt text plays an important role in helping search engines index images effectively. By including relevant keywords within the alt text, you can enhance the visibility of your images in search results. This not only improves overall site rankings but also drives traffic from image searches.
When crafting alt text, it is essential to be concise yet descriptive. Ideally, each description should accurately convey what the image depicts, without over explaining. Although alt text is a great way to add relevant keywords to your pages, you should avoid keyword stuffing and focus on clarity and relevance to ensure the users who are visually imparied understand the content on the page.