nerdexam
CIW

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

HTML and XHTML

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)
  • A
    9% (4)
  • B
    4% (2)
  • C
    72% (34)
  • D
    15% (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 be rect), and the coords value 7S contains a letter instead of a number, making it malformed.
  • B - shape="rectangle" is again invalid, and href="www.xyz.com" lacks a protocol (http:// or https://), which is required for a valid absolute URL in HTML5.
  • D - The href value 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

#image maps#area element#HTML5 validation#href attribute

Community Discussion

No community discussion yet for this question.

Full 1D0-610 Practice