HTML - <map> Tag



Description

The HTML <map> tag is used for defining an image map along with <img> tag.

Example

<!DOCTYPE html>
<html>

   <head>
      <title>HTML map Tag</title>
   </head>

   <body>
      <img src = "/images/html.gif" alt = "HTML Map" border = "0" usemap = "#html"/>

      <!-- Create  Mappings -->
      <map name = "html">
         <area shape = "circle" coords = "154,150,59" href = "about/about_team.htm"
            alt = "Team" target = "_self" />
      </map>
   </body>

</html>

This will produce the following result, find the image map on bottom right −

Global Attributes

This tag supports all the global attributes described in − HTML Attribute Reference

Specific Attributes

The HTML <map> tag also supports the following additional attributes −

Attribute Value Description
name unique_name Defines a unique name for the map tag.

Event Attributes

This tag supports all the event attributes described in − HTML Events Reference

Browser Support

Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Yes Yes
html_tags_reference.htm
Advertisements