The HTML <area>
element 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 shape, the coords value is two x,y pairs: left, top, right, and bottom. For a circle
shape, 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. For a poly
or polygon shape, the value is a set of x,y pairs for each point in the polygon: x1,y1,x2,y2,x3,y3,
and so on. In HTML4, the values are numbers of pixels or percentages, if a percent sign (%) is appended; in HTML5, the values are numbers of CSS pixels.download
HTML5
<a>
for a full description of the download
attribute.href
hreflang
HTML5
name
HTML 4 only, Obsolete since Gecko 5.0
media
HTML5
print and screen
. If omitted, it defaults to all
. Use this attribute only if the href attribute is present.nohref
HTML 4 only, Obsolete since Gecko 5.0
Usage note: This attribute is obsolete in HTML5, instead omitting the href attribute is sufficient.
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 non standard.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="200,250,25" href="another.htm" /> <area shape="default" nohref /> </map> <img src="picture.png" alt="pic" usemap="#primary" />
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.
HTML 5.1 defines obsolete the attribute type on this tag.
Specification | Status | Comment |
---|---|---|
Referrer Policy The definition of 'referrerpolicy attribute' in that specification. | Working Draft | Added the referrerpolicy attribute. |
WHATWG 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 |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
referrerpolicy | No support | ? | 50 (50) | No support | No support | No support |
Feature | Android | Android Webview | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mini | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|---|---|
Basic support | ? | (Yes) | (Yes) | ? | ? | ? | ? | ? | (Yes) |
referrerpolicy | No support | No support | ? | 50.0 (50) | No support | No support | No support | No support | No support |
© 2005–2017 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