HTML map name attribute
Examples
With clickable image map area:
<img src="planets.gif"
width="145" height="126"
alt="Planets"
usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>
try it"
Browser Support
All major browsers support name attribute.
Definition and Usage
name attribute is required, specify the name of the image map.
usemap name attribute associated with the attribute <img> tag linked to create a relationship between the image and the mapping.
Differences between HTML 4.01 and HTML5
no.
grammar
<map name="mapname">
Property Value
值 | 描述 |
---|---|
mapname | 图像映射的名称。 |
HTML <map> tag