1D0-61B · Question #54
You are modifying an existing Web page that needs to validate as HTML5 code. To create a inside the <map> </map> container tags?
The correct answer is C. <area shape="rect" coords="78, 0, 156, 75" href="http://www.xyz.com" alt="xyz" />. Option C is correct because HTML5 requires the shape attribute value to be "rect" (the abbreviated form), not "rectangle" - the spec defines only rect, circle, poly, and default as valid values. It also includes a properly formatted absolute URL with the http:// protocol and…
Question
You are modifying an existing Web page that needs to validate as HTML5 code. To create a inside the <map> </map> container tags?
Options
- A<area shape="rectangle" coords="78, 0, 156, 75" href="http://www.xyz.com" alt="xyz" />
- B<area shape="rectangle" coords="78, 0, 156, 75" href="www.xyz.com" alt="xyz" />
- C<area shape="rect" coords="78, 0, 156, 75" href="http://www.xyz.com" alt="xyz" />
- D<area shape="rect" coords="78, 0, 156, 75" href="http://www.xyz.com / >
How the community answered
(41 responses)- A2% (1)
- B7% (3)
- C78% (32)
- D12% (5)
Explanation
Option C is correct because HTML5 requires the shape attribute value to be "rect" (the abbreviated form), not "rectangle" - the spec defines only rect, circle, poly, and default as valid values. It also includes a properly formatted absolute URL with the http:// protocol and the required alt attribute, and closes the self-closing tag correctly with />.
Why the distractors fail:
- A uses
shape="rectangle"-"rectangle"is not a valid HTML5 shape value, so it fails validation even though everything else looks correct. - B has the same
shape="rectangle"problem, and thehrefvalue"www.xyz.com"is missing thehttp://protocol, making it a relative path rather than an absolute URL. - D uses the correct
shape="rect"but has a fatally broken closing - thehrefvalue is never closed with a quote, thealtattribute is missing entirely, and the tag is malformed (/ >merged into the URL), making it invalid HTML5.
Memory tip: Think of HTML5 shape names as abbreviations - rect, not rectangle; circle stays circle; poly, not polygon. If you remember the four valid values (rect, circle, poly, default), you can immediately eliminate any option spelling out the full word "rectangle."
Topics
Community Discussion
No community discussion yet for this question.