The alt attribute of an image is used to:
- add a border
- align the image
- set the image width
- show alternative text if the image cannot be displayed
Answer
D) show alternative text if the image cannot be displayed
It also helps screen readers and search engines.
Computer Science MCQ · More HTML Links, Images, Colours, Frames and Tables MCQs · Practise