ALT text is alternative text that is added to images embedded on a web page in order to give meaning to that image for users who cannot see it. The primary reason for ALT text is for accessibility, to ensure your website is inclusive and works for all users.
ALT text is also very useful for SEO (Search Engine Optimisation) since when Google indexes your website it uses ALT text to help tag images and help return relevant images in Image Search queries. Also, if images don’t load for any reason (for example a slow mobile network) the text will appear in a blank box that would normally contain the image.
Having better ALT text means your website is accessible and helps your search engine ranking.
How to write ALT text?
If an image contains meaning you need to ensure it has appropriate ALT text. You should write something that describes the information the image represents, don’t describe the image itself. Imagine reading the ALT text out too yourself as if you are reading the page, if it makes sense chances are you’ve written it well.
For example, for a logo of our web agency good ALT text would be “Studio 24”, bad ALT text would be “logo” or “logo of Studio 24”.
For a picture of a group of children playing a game good ALT text would be “Group of children playing hopscotch”, bad ALT text would be “large image of children playing”.
For an email icon that links to emailing someone, good ALT text would describe the action, e.g. “Email Studio 24”, bad ALT text would be “email icon”.
If the image doesn’t contain meaning (e.g. it’s just decoration) you can leave the ALT text empty. Accessibility guidelines state decorative images should have empty ALT text.
ALT text and accessibility:
Another use of alternative text is for screen- readers for the blind and visually impaired, so it is important that the image description (ALT text) makes sense in the context of the page, because a screen reader will read the text out as part of a sentence. For this reason, images should all be labelled correctly, for improved accessibility on your website.
Some things to bear in mind:
- Add text that makes sense, (imagine a robotic screen- reader, reading the text out).
- Think about search terms people might be using to find you or your images.
- This might take a little time for effects to kick in (search engines are a little slow at re indexing new information).
- Although guidelines from search engines state that it is good to include keywords in your alt text, but what you need is good information relating the surrounding content, don’t spam your own pages by stuffing keywords into alt text- it won’t work.