nerdexam
CIW

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…

HTML5 Coding

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)
  • A
    2% (1)
  • B
    7% (3)
  • C
    78% (32)
  • D
    12% (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 the href value "www.xyz.com" is missing the http:// protocol, making it a relative path rather than an absolute URL.
  • D uses the correct shape="rect" but has a fatally broken closing - the href value is never closed with a quote, the alt attribute 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

#HTML5#map element#image maps#area element

Community Discussion

No community discussion yet for this question.

Full 1D0-61B Practice