English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
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 ‹/›
IEFirefoxOperaChromeSafari
Except for Chrome and Safari, all other mainstream browsers support the usemap attribute.
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.
None.
<object usemap="#mapname">
Value | Description |
---|---|
#mapname | Hash (#) followed by the name of the map element to be used. |