1D0-610 · Question #11
To insert a graphic in a Web page and successfully validate the page as HTNL5, the <img> element must include:
The correct answer is B. The alt attribute. In HTML5, the alt attribute is required on all <img> elements for the page to pass validation - it provides alternative text for screen readers and displays when the image fails to load, making it essential for both accessibility and standards compliance. The id attribute (A)…
Question
To insert a graphic in a Web page and successfully validate the page as HTNL5, the <img> element must include:
Options
- AThe id attribute
- BThe alt attribute
- CThe target attribute
- DThe name attribute
How the community answered
(50 responses)- A2% (1)
- B92% (46)
- C4% (2)
- D2% (1)
Explanation
In HTML5, the alt attribute is required on all <img> elements for the page to pass validation - it provides alternative text for screen readers and displays when the image fails to load, making it essential for both accessibility and standards compliance. The id attribute (A) is optional and used for targeting elements with CSS or JavaScript, not required for image insertion. The target attribute (C) belongs to anchor (<a>) and form elements, not images. The name attribute (D) is largely deprecated in HTML5 and was never required for <img>. Memory tip: Think "alt = always" - the alt attribute is the one thing you can never leave off an image tag if you want valid, accessible HTML5.
Topics
Community Discussion
No community discussion yet for this question.