HTML DOM Map name attribute
Examples
Get the name of the map image:
x output values:
try it"
Definitions and use
name or name attribute is used to set the property values return to the image map.
name attribute describes the name of the map image.
usemap name attribute associated with the attribute <img> tag linked to create a relationship between the image and the mapping.
Note: When you set the name property, you need to set the <img> 's usemap property - if not set, image and map elements are no longer associated (clickable areas will no longer clickable).
Note: In HTML5, <map> id attribute value and attribute name element must be the same (but not be null or empty values).
Browser Support
All major browsers support name attribute.
grammar
Returns the name attribute:
Setting name attribute:
Property Value
value | description |
---|---|
name | Specifies the name of the map image |
Technical Description
return value: | String representing the name of the map image |
---|
More examples
Examples
Modify the image map names:
try it"
Related Pages
HTML Reference Manual: HTML <Map> name attribute