usemap (HTML attribute)

Depr. Version
Browser support (more…)
IE8+ FF1+ SA4 OP10 CH2
Full Full None None None


usemap="#map name"


The usemap attribute tells the browser which of the map elements in the document it should refer to. The hotspots defined (using the area element) act as overlays on the object. These areas are similar to links (created with the a element), and allow the user to click to go to the page identified in the respective area’s href attribute. They’re also keyboard-navigable.

The usemap attribute is only used in the object element when the type of object is an image (.gif, .jpg, or .png).


This usemap attribute references a map named "dogmap":

  <object data="giant-dog.jpg" usemap="#dogmap"
      height="225" width="300" border="0"></object>
  <map name="dogmap" id="dogmap">
    <area shape="circle" coords="216,120,24"
        alt="Click on the nose for more info about this big dog!"/>


This attribute takes as its value a reference to the map’s name attribute in form of an "#" character plus the "name", like so:



Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 3.0 3.5 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
None None None Full Full Full Full Full Full None None None None None None None None

Very poor support for this attribute. Assuming that the browser is capable of rendering the content defined in the object tag in the first place (IE 7 and earlier, we’re looking at you), getting the usemap attribute to to work is a fruitless task, at least in any browser other than Firefox. However, the usemap attribute works perfectly well when used with the img element, so if an image map is what you need, take that approach instead.

User-contributed notes

Related Products