<?xml version="1.0" encoding="utf-8"?>

The alt attribute

The alt attribute Bad Practice
The alt attribute Best Practice

The alt attribute, aka alt description, provides a text explanation for an image if users, for some reason, cannot view it. It could be a slow connection or an error in the src attribute. Not to mention, alternative text is a lifesaver for screen reader users. In a nutshell, this device reads HTML code aloud to visually impaired individuals or those with learning disabilities, making the content accessible to everyone.

Improve your UX & Product skills with interactive courses that actually work