You are here: Reference > HTML > attributes > useMap (applet, img, object, ...)

useMap attribute (applet, img, object, ...)

Browser support:
Sets the URL to use as an image map.
This attribute identifies a map element to use as an image map for the object to specify the clickable (anchor-like) regions in the current image.
JavaScript page for this attribute: useMap. You can find other example(s) there.

Possible values:

String that sets the URL of the image map.
The URL often contains a bookmark extension (#name), where the 'name' is the value of a map object's name attribute. The URL can be an absolute or relative path as well. Relative paths are relative to the base URL. The base URL is the location of the current document, but it can be overridden by the base tag.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the useMap attribute:
<img id="myImage" 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