map

FilterElements

<map> ... </map>

Specifies a client-side image map. It contains some number of area elements that establish clickable regions within the image map.

Notes

The map must be named using the name attribute in HTML documents, the id attribute in XHTML documents, or both for backward compatibility. When both are used, they must have the same value.

Start/End Tags

Required/Required

Specifications

  • HTML 4.01
  • HTML5

id=

Values: text
Required in XHTML. Gives the map a unique name so that it can be referenced from a link, script, or style sheet.

name=

Values: text
Required in HTML 4.01 and 5; deprecated in XHTML 1.0 only; use id instead. Gives the image map a name that is then referenced within the img element.
<img src="map_image.png" width="250" height="150" usemap="#sample">

<map name="sample" id="sample">
<area shape="rect" coords="21,13,100,135" href="one.html">
<area shape="circle" coords="180,72,46" href="two.html">
</map>

Rendered Example