MCQ
What is the purpose of the alt attribute in the <img> tag?
Unit-3 Programming Fundamentals
A It sets the image size
B It shows alternate text when the image cannot be displayed
C It changes the image color
D It makes the image clickable
Explanation

The alt attribute provides alternate text that appears if the image fails to load or for screen readers.