The alt attribute of an image is used for:

  1. Image rotation
  2. Alternative text for screen readers and when the image fails to load
  3. Image size
  4. Linking the image
Answer

B) Alternative text for screen readers and when the image fails to load

alt describes the image for accessibility and fallback.

Computer Science MCQ · More Lab: Mobile-Friendly Web Page MCQs · Practise