You are here: Reference > HTML > attributes > name (map)

name attribute (map)

Browser support:
Sets the name of an image map that helps to establish a relationship between an image and an image map.
Use the name of an image map for the value of the an image element's useMap attribute to establish a relationship between an image and an image map. See Example 1 for details.
JavaScript page for this attribute: name. You can find other example(s) there.

Possible values:

String that sets the name of the image map.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the name attribute:
<img src="area.gif" width="504px" height="126px" border="0px" alt="Solar System" usemap="#SampleMap" />
<map name="SampleMap">
    <area shape="rect" coords="1,-1,83,125" alt="rectangle" href="#" />
    <area shape="circle" coords="234,57,30" alt="circle" href="#" />
    <area shape="poly" coords="363,37,380,40,399,35,420,47,426,63,423,78,430,94,409,90,395,92,379,84,371,67,370,57" alt="polygon" href="#" />
</map>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content