What is the role of the alt attribute in HTML?

The alt attribute provides alternative text for an image in case the image cannot be displayed. This is important for accessibility, as screen readers can read the alt text to describe the image to visually impaired users.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *