Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML tag

HTML tag

Example

An image map with clickable areas:

Planets

  Sun

  Mercury

  Venus

Try it »


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

Currently most browsers support the tag.


Tag Definition and Usage Notes

The tag is used for client-side image maps. An image map is an image with clickable areas.

The usemap attribute in can reference the id or name attribute in (depending on the browser), so we should add both id and name attributes to .

The area element is always nested inside the map element. The area element defines regions in an image map.


Differences between HTML 4.01 and HTML5

Note: In HTML5, if the id attribute is specified in the tag, you must also specify the name attribute.


Differences between HTML and XHTML

In XHTML, the name attribute has been deprecated and replaced by the id attribute.


property

property Value Description
name mapname Required. Specifies the name of the image-map.

Global Attributes

The tag supports global attributes; see the full list in HTML Global Attributes.


Event attribute

The tag supports all HTML Event Attributes.