English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML object usemap attribute

The usemap attribute specifies the name of the image map to be used with the object, an image map is an image with clickable areas.

 HTML <object> tag

Online Example

Using the <object> element with image maps:

<!DOCTYPE html>
<html>
<head>
<title>HTML:<object> usemap attribute - 基础教程网(oldtoolbag.com)</title>
</head>
<body>
<object data="planets.gif" width="145"height="126"usemap="#planetmap"></object>
<map name="planetmap">
  <area shape="rect" coords="0,0,82,126"alt="Sun" href="sun.html">
  <area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.html">
  <area shape="circle" coords="124,58,8" alt="Venus" href="venus.html">
</map>
</body>
</html>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Except for Chrome and Safari, all other mainstream browsers support the usemap attribute.

Definition and Usage

The usemap attribute specifies the name of the image map to be used with the object.

Image maps are images with clickable areas.

The usemap attribute is associated with <map> The name attribute of the HTML element is associated with it, creating a relationship between the object and the map.

HTML 4.01 and HTML5Differences between

None.

Syntax

<object usemap="#mapname">

Attribute Value

ValueDescription
#mapnameHash (#) followed by the name of the map element to be used.
 HTML <object> tag