English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The required name attribute specifies the name of the image map and is associated with the usemap attribute of <img>, creating a relationship between the image and the map.
Image map with clickable areas:
<!DOCTYPE html> <html> <head> <title>HTML:<map> name attribute - 基础教程网(oldtoolbag.com)</title> </head> <body> <p>Click on the sun or on one of the planets to watch it closer:</p> <img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap"> <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 it out ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the name attribute.
The name attribute specifies the name of the image map.
The name attribute is associated with the usemap attribute of <img> and creates a relationship between the image and the map.
None.
<map name="mapname">
Value | Description |
---|---|
mapname | Name of the image map. |