ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
Which of the following statements about including an 'alt' attribute on the 'img' tag in HTML is/are correct?
A. Users who cannot see the image due to vision impairment can have a textual description read aloud by a screen reader.
B. If the image fails to load (slow connection, broken path, etc.), alt text is displayed instead.
C. It provides SEO (Search Engine Optimization) benefits.
Choose the correct answer:
Correct Answer: D — A, B, and C
All three statements are correct. The 'alt' attribute on an HTML 'img' tag serves accessibility (screen readers for visually impaired users), graceful degradation (alt text displays when an image fails to load), and SEO purposes (search engines index alt text to understand image content). All three are well-established, practical reasons to always include the alt attribute.