<map> tag specifies a client-side image map.
An image map is a list of coordinates relating to a specific image, created in order to hyperlink areas of the image to various destinations (as opposed to a normal image link, in which the entire area of the image links to a single destination).
For example, a map of the world may have each country hyperlinked to further information about that country. The intention of an image map is to provide an easy way of linking various parts of an image without dividing the image into separate image files.
The following table summarizes the usages context and the version history of this tag.
|Start/End Tag:||Start tag: required, End tag: required|
|Version:||HTML 3.2, 4, 4.01, 5|
The basic syntax of the
<map> tag is given with:
The example below shows the
<map> tag in action.
ExampleTry this code »
<img src="shapes.png" usemap="#shapes" alt="Geometrical Shapes">
<area shape="circle" coords="40,40,40" href="circle.html" alt="Circle">
<area shape="poly" coords="148,2,104,80,193,80" href="triangle.html" alt="Triangle">
<area shape="rect" coords="226,2,323,80" href="rectangle.html" alt="Rectangle">
<area shape="poly" coords="392,2,352,32,366,80,418,80,432,32" href="pentagon.html" alt="Pentagon">
Note:An image may be associated with an image map, via a
usemap attribute. The
usemap attribute, if specified, must be a string beginning with a hash character (
#) followed by the value of the
name attribute of the
The following table shows the attributes that are specific to the
||text||Assigns a name to the image map.|
Like all other HTML tags, the
<map> tag supports the global attributes in HTML5.
<map> tag also supports the event attributes in HTML5.
<map> tag is supported in all major modern browsers.
See tutorial on: HTML Images.