Which of the statements given below is/are correct? It is always important and…
2021
Which of the statements given below is/are correct?
It is always important and useful to include an 'alt' attribute on 'img' tag in HTML because
A. users who cannot see the image due to vision impairment can have a textual description of the image (which can be spoken aloud by a screenreader).
B. If the image fails to load (slow connection, broken path, etc.) then alt text is displayed instead.
C. SEO (Search Engine Optimization) benefits.
Choose the correct answer from the options given below:
Answer: D. A, B, and C — Answer: All three statements are correct. Why include an alt attribute? Accessibility: Screen readers read the alt text so users with vision impairment can…
- A.
A only
- B.
B and C only
- C.
C only
- D.
A, B, and C
Attempted by 74 students.
Show answer & explanation
Correct answer: D
Answer: All three statements are correct.
Why include an alt attribute?
Accessibility: Screen readers read the alt text so users with vision impairment can understand the image content.
Fallback display: If the image fails to load (broken link, slow connection), browsers and text-only agents can show or expose the alt text instead.
SEO: Search engines use alt text to understand image content, which can improve indexing and discoverability.
How to write alt text: Keep alt text concise and descriptive. If an image is purely decorative, use an empty alt attribute (alt="") so assistive technologies skip it.
A video solution is available for this question — log in and enroll to watch it.