HTML usemap attribute

usemap attribute represents the name of the image map to use for the map.


<img src="files/three images.jpg" usemap="#shapes" alt="shape of circle">
 <map name="shapes">
  <area alt="triangle" title="triangle" href="triangle.html" shape="poly" coords="13,122,50,61,86,123" />
Try </>

src attribute defines the location of the image.

href attribute defines a link on an area.

usemap attribute value

The value of usemap attribute is the name of the image followed by hash.

Related Tags

The tags which support this attribute are as follows.

<img> tag

Img element adds an image in the web page. See the example above.

<object> tag

object element represents embedded content such as images, video or audio. It also references the image to the map.

Related Pages

area element defines geometric area drawn by coordinates.

map element contains all the area elements.

coords attribute means coordinates of the area.

shape attribute defines the shape of the area.

Was this article helpful?




Get the newsletter