1D0-610 · Question #2
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 uses shape="rect" - the only valid HTML5 attribute value for a rectangular hotspot. HTML5 does not recognize "rectangle" as a valid shape; the accepted values are rect, circle, and poly. Why the others fail: A - shape="rectangle" is invalid (must be rect), and the coords
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="7S, 0, 156, 75" href="http://www.xyz.co.at" 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
(47 responses)- A9% (4)
- B4% (2)
- C72% (34)
- D15% (7)
Explanation
Option C uses shape="rect" - the only valid HTML5 attribute value for a rectangular hotspot. HTML5 does not recognize "rectangle" as a valid shape; the accepted values are rect, circle, and poly.
Why the others fail:
- A -
shape="rectangle"is invalid (must berect), and the coords value7Scontains a letter instead of a number, making it malformed. - B -
shape="rectangle"is again invalid, andhref="www.xyz.com"lacks a protocol (http://orhttps://), which is required for a valid absolute URL in HTML5. - D - The
hrefvalue is missing its closing quotation mark before/>, making the tag syntactically broken and unable to validate.
Memory tip: Think of HTML5 shape values as abbreviations - rect, circle, poly - never spelled out in full. If you see "rectangle" on an exam, it's always a trap.
Topics
Community Discussion
No community discussion yet for this question.