The <area>
defines a hot-spot region on an image, and optionally associates it with a hypertext link. This element is used only within a <map>
element.
Content categories | Flow content, phrasing content. |
---|---|
Permitted content | None, it is an empty element. |
Tag omission | Must have a start tag and must not have an end tag. |
Permitted parents | Any element that accepts phrasing content. The <area> element must have an ancestor <map> , but it need not be a direct parent. |
Permitted ARIA roles | None |
DOM interface | HTMLAreaElement |
This element's attributes include the global attributes.
accesskey
HTML 4 only, Obsolete since Gecko 5.0
alt
coords
rect
or rectangle: the coords value is two x,y pairs: left, top, right, bottom.circle
: the value is x,y,r
where x,y
is a pair specifying the center of the circle and r
is a value for the radius.poly
or polygon: the value is a set of x,y pairs for each point in the polygon: x1,y1,x2,y2,x3,y3,
and so on.download
HTML5
<a>
for a full description of the download
attribute.href
hreflang
HTML5
name
HTML 4 only, Obsolete since Gecko 5.0
nohref
HTML 4 only, Obsolete since Gecko 5.0
Usage note: This attribute is obsolete in HTML5, instead omitting the href attribute is sufficient.
ping
POST
requests with the body PING
will be sent by the browser (in the background). Typically used for tracking.referrerpolicy
"no-referrer"
meaning that the Referer:
header will not be sent.no-referrer-when-downgrade
" meaning that no Referer:
header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior, if no policy is otherwise specified."origin"
meaning that the referrer will be the origin of the page, that is roughly the scheme, the host and the port."unsafe-url"
meaning that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins.rel
HTML5
shape
rect
, which defines a rectangular region; circle
, which defines a circular region; poly
, which defines a polygon; and default
, which indicates the entire region beyond any defined shapes. Many browsers, notably Internet Explorer 4 and higher, support circ
, polygon
, and rectangle
as valid values for shape; these values are .tabindex
HTML 4 only, Obsolete since Gecko 5.0
target
_self
: Load the response into the same HTML4 frame (or HTML5 browsing context) as the current one. This value is the default if the attribute is not specified._blank
: Load the response into a new unnamed HTML4 window or HTML5 browsing context._parent
: Load the response into the HTML4 frameset parent of the current frame or HTML5 parent browsing context of the current one. If there is no parent, this option behaves the same way as _self
._top
: In HTML4: Load the response into the full, original window, canceling all other frames. In HTML5: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self
.type
Obsolete since Gecko 5.1
<map name="primary"> <area shape="circle" coords="75,75,75" href="left.html" alt="Click to go Left"> <area shape="circle" coords="275,75,75" href="right.html" alt="Click to go Right"> </map> <img usemap="#primary" src="http://placehold.it/350x150" alt="350 x 150 pic">
Under the HTML 3.2, 4.0, and 5 specifications, the closing tag </area>
is forbidden.
The XHTML 1.0 specification requires a trailing slash: <area />
.
The id, class, and style attributes have the same meaning as the core attributes defined in the HTML 4 specification, but only Netscape and Microsoft define them.
Netscape 1–level browsers do not understand the target attribute as it relates to frames.
HTML 3.2 defines only alt, coords, href, nohref, and shape.
Specification | Status | Comment |
---|---|---|
Referrer Policy The definition of 'referrerpolicy attribute' in that specification. | Candidate Recommendation | Added the referrerpolicy attribute. |
HTML Living Standard The definition of '<area>' in that specification. | Living Standard | |
HTML5 The definition of '<area>' in that specification. | Recommendation | |
HTML 4.01 Specification The definition of '<area>' in that specification. | Recommendation |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | Yes | 1 | Yes | Yes | Yes |
accesskey
|
Yes | Yes | 1 | Yes | Yes | Yes |
alt |
Yes | Yes | 1 | Yes | Yes | Yes |
coords |
Yes | Yes | 1 | Yes | Yes | Yes |
download |
Yes | Yes | Yes | Yes | Yes | Yes |
href |
Yes | Yes | 1 | Yes | Yes | Yes |
hreflang |
Yes | Yes | Yes | Yes | Yes | Yes |
name
|
Yes | Yes | 1 | Yes | Yes | Yes |
media |
Yes | Yes | Yes | Yes | Yes | Yes |
nohref
|
Yes | Yes | 1 | Yes | Yes | Yes |
referrerpolicy |
51 | No | 50 | No | 38 | 11.1 |
rel |
Yes | Yes | Yes | Yes | Yes | Yes |
shape |
Yes | Yes | 1 | Yes | Yes | Yes |
tabindex
|
Yes | Yes | 1 | Yes | Yes | Yes |
target |
Yes | Yes | 1 | Yes | Yes | Yes |
type
|
Yes | Yes | 1 | Yes | Yes | Yes |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | Yes | 4 | Yes | Yes | Yes |
accesskey
|
Yes | Yes | Yes | 4 | Yes | Yes | Yes |
alt |
Yes | Yes | Yes | 4 | Yes | Yes | Yes |
coords |
Yes | Yes | Yes | 4 | Yes | Yes | Yes |
download |
Yes | Yes | Yes | Yes | Yes | Yes | Yes |
href |
Yes | Yes | Yes | 4 | Yes | Yes | Yes |
hreflang |
Yes | Yes | Yes | Yes | Yes | Yes | Yes |
name
|
Yes | Yes | Yes | 4 | Yes | Yes | Yes |
media |
Yes | Yes | Yes | Yes | Yes | Yes | Yes |
nohref
|
Yes | Yes | Yes | 4 | Yes | Yes | Yes |
referrerpolicy |
51 | 51 | No | 50 | 38 | No | 7.2 |
rel |
Yes | Yes | Yes | Yes | Yes | Yes | Yes |
shape |
Yes | Yes | Yes | 4 | Yes | Yes | Yes |
tabindex
|
Yes | Yes | Yes | 4 | Yes | Yes | Yes |
target |
Yes | Yes | Yes | 4 | Yes | Yes | Yes |
type
|
Yes | Yes | Yes | 4 | Yes | Yes | Yes |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area