docs.rodeo

MDN Web Docs mirror

: The Image Map Area element

{{HTMLSidebar}} 

The <area> HTML element defines an area inside an image map that has predefined clickable areas. An image map allows geometric areas on an image to be associated with {{Glossary("Hyperlink", "hypertext links")}} .

This element is used only within a {{HTMLElement("map")}}  element.

{{InteractiveExample("HTML Demo: &lt;area&gt;", "tabbed-taller")}} 

<map name="infographic">
  <area
    shape="poly"
    coords="129,0,260,95,129,138"
    href="https://developer.mozilla.org/docs/Web/HTTP"
    alt="HTTP" />
  <area
    shape="poly"
    coords="260,96,209,249,130,138"
    href="https://developer.mozilla.org/docs/Web/HTML"
    alt="HTML" />
  <area
    shape="poly"
    coords="209,249,49,249,130,139"
    href="https://developer.mozilla.org/docs/Web/JavaScript"
    alt="JavaScript" />
  <area
    shape="poly"
    coords="48,249,0,96,129,138"
    href="https://developer.mozilla.org/docs/Web/API"
    alt="Web APIs" />
  <area
    shape="poly"
    coords="0,95,128,0,128,137"
    href="https://developer.mozilla.org/docs/Web/CSS"
    alt="CSS" />
</map>
<img
  usemap="#infographic"
  src="/shared-assets/images/examples/mdn-info.png"
  alt="MDN infographic" />
img {
  display: block;
  margin: 0 auto;
  width: 260px;
  height: 260px;
}

Attributes

This element’s attributes include the global attributes.

Examples

<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="https://dummyimage.com/350x150"
  alt="350 x 150 pic" />

Result

{{ EmbedLiveSample('Examples', 360, 160) }} 

Technical summary

Content categories Flow content, phrasing content.
Permitted content None; it is a `{{Glossary("void 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 `{{HTMLElement("map")}}` , but it need not be a direct parent.
Implicit ARIA role link when href attribute is present, otherwise generic
Permitted ARIA roles No role permitted
DOM interface `{{domxref("HTMLAreaElement")}}` 

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

In this article

View on MDN