--- title: slug: Web/HTML/Element/area translation_of: Web/HTML/Element/area ---
<area>
элемент определяет активную область на изображении и, при желании, связывает её с {{Glossary("Hyperlink", "гипертекстовой ссылкой")}}. Этот элемент используется только внутри элемента {{HTMLElement("map")}}.The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Категории содержимого | Элементы потока, фразового контента. |
---|---|
Разрешённое содержимое | Нет, это {{Glossary("пустой элемент")}}. |
Пропуск тегов |
Открывающий тег обязателен, закрывающего быть не должно. |
Допустимые родительские элементы |
Любой элемент, допускающий фразовый контент. У элемента |
Разрешённые роли ARIA | Нет |
DOM интерфейс | {{domxref("HTMLAreaElement")}} |
Этот элемент включает в себя только глобальные атрибуты.
rect
или прямоугольника задаются две пары значений x,y coords: лево, верх, право и низ. Для circle
, значения x,y,r
где x,y
координаты центра круга, а r
радиус. Для poly
или многоугольника, значения задаются парой x и y для каждой вершины многоугольника: x1,y1,x2,y2,x3,y3,
и т.д. В HTML4 значения задаются в пикселях или процентах, когда добавлен знак (%); в HTML5, значения — величины в пикселях.print and screen
. If omitted, it defaults to all
. Use this attribute only if the href attribute is present.Usage note: This attribute is obsolete in HTML5, instead omitting the href attribute is sufficient.
"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.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_inline}}._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
.<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">
{{ EmbedLiveSample('Example', 360, 160) }}
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 |
---|---|---|
{{SpecName('Referrer Policy', '#referrer-policy-delivery-referrer-attribute', 'referrerpolicy attribute')}} | {{Spec2('Referrer Policy')}} | Added the referrerpolicy attribute. |
{{SpecName('HTML WHATWG', 'embedded-content.html#the-area-element', '<area>')}} | {{Spec2('HTML WHATWG')}} | |
{{SpecName('HTML5 W3C', 'embedded-content-0.html#the-area-element', '<area>')}} | {{Spec2('HTML5 W3C')}} | |
{{SpecName('HTML4.01', 'struct/objects.html#h-13.6.1', '<area>')}} | {{Spec2('HTML4.01')}} |
{{Compat("html.elements.area")}}