<map> tag

HTML <map> tag

The <map> tag represents a map within the <img> tag.

It contains <area> elements which contains coordinates to make them clickable areas.

Syntax:
<map name=”mapid”> …</map>

Example

<map name="Maps">
  <area shape ="poly" coords ="5,47,45,12,105,7,140,60,120,300,12,90" href ="http://www.thrillophilia.com/blog/beautiful-places-in-india/" target="_blank" alt="india places">
  <area shape ="circle" coords ="154,150,59"
    href ="https://www.tripadvisor.in/HotelsList-India-Luxury-Resorts-zfp7790667.html" target="_blank"
    alt="india resorts">
</map>

Default CSS Value

display: inline;

How Browser will display

INLINE.

Difference between HTML4.01, XHTML and HTML5

HTML4 XHTML HTML5
NA name attribute is deprecated new sizes attribute is added. The id attribute must hae the same value as the name attribute.

Attributes used with <map> tag

Attribute Description
name To set the name of the map element. This is mandatory attribute.
id To set the id of the map. This is optional attribute.

Global Attributes

The <map> tag supports Global attributes.

Event Attributes

The <map>  tag supports Event attributes.

Supporting Browsers

supporting-browsers for tags

Related Tags

<img> & <area> tags.

Tutorials for all brains!