How do you add alternative text?

It is important to consider the purpose of the image before adding alt text. Does the image have a function or is it just presenting content? This will affect its alt text. Images that have a function are used as a link or button. Images that only present content are often not clickable and are used for providing further information.

If an image is purely decorative and doesn’t add information to the page developers should add an empty alt text, for example, alt="". This allows users of assistive technology to ignore these images. 

To add alt text to images use the alt attribute.

<img src="/img/silvertone-hills-logo.jpg"
     alt="Silvertone Hills">