What is the purpose of the alt attribute on an image?
- A To display a tooltip on hover
- B To describe the image for screen readers and when the image fails to load
- C To set the image caption
- D To specify the image format
Answer
To describe the image for screen readers and when the image fails to load
Alt text should convey the image's purpose. Purely decorative images should use an empty alt attribute so they are skipped.





