From http://www.w3schools.com (Copyright Refsnes Data)
ExampleAn image map, with clickable areas:
|
The <area> tag defines a region in an image map.
The area element is always nested inside a <map> tag.
![]()
The <area> tag is supported in all major browsers.
In HTML the <area> tag has no end tag.
In XHTML the <area> tag must be properly closed.
Note: The usemap attribute in the <img> tag refers to the id or name (browser dependant) attribute in <map>, therefore we have added both the id and name attributes to <map>.
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
| Attribute | Value | Description | DTD |
|---|---|---|---|
| alt | text | Specifies an alternate text for the area | STF |
| Attribute | Value | Description | DTD |
|---|---|---|---|
| coords | if shape="rect" then if shape="circ" then if shape="poly" then |
Specifies the coordinates for the clickable area | STF |
| href | URL | Specifies the target URL of the area | STF |
| nohref | true false |
Excludes an area from the image map | STF |
| shape |
rect rectangle circ circle poly polygon |
Defines the shape of the area | STF |
| target | _blank _parent _self _top |
Where to open the target URL.
|
TF |
| id, class, title, style, dir, lang, xml:lang, tabindex, accesskey |
For a full description, go to Standard Attributes.
| onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup, onfocus, onblur |
For a full description, go to Event Attributes.
From http://www.w3schools.com (Copyright Refsnes Data)