According to WhatIs.com, Alt text (alternative text) is a word or phrase that can be inserted as an attribute in an HTML document to tell website viewers the nature or contents of an image.
Alternative text has several roles:
- It makes the content or function of the image accessible to users with visual or cognitive impairments.
- It is displayed by default to replace the image when it can not be displayed on a web page or e-mail.
- Finally, it contributes to the SEO of a page by adding a semantic content to the images.
Alternative text can be used in two different ways:
- In the alt attribute of the
- In the context and content present around the image itself.