<area>

HTML4 HTML5

Defines a clickable area (e.g., rectangle, circle, or polygon) inside an image map (the <map> element). Allows assigning hyperlinks to specific parts of a single image.

The tag is self-closing (has no closing tag).

Attributes:

shape="..." - Shape of the area: rect (rectangle), circle (circle), poly (polygon), or default (entire region).

coords="..." - Coordinates defining the location and dimensions of the area in pixels.

href="..." - Hyperlink URL when clicking the area.

alt="..." - (Required when href is present) Alternative text describing the area.

Example

Code:

<img src="data:image/svg+xml;utf8,
<svg xmlns='http://www.w3.org/2000/svg' width='200' height='100'>
<rect width='200' height='100' fill='%23eee'/>
<rect x='10' y='10' width='80' height='80' fill='%23007bff'/>
<circle cx='150' cy='50' r='40' fill='%2328a745'/>
</svg>"
alt="Shape map" usemap="#shapemap" width="200" height="100">

<map name="shapemap">
  <area shape="rect" coords="10,10,90,90" alt="Blue rectangle" href="https://example.com/rect" title="Blue rectangle">
  <area shape="circle" coords="150,50,40" alt="Green circle" href="https://example.com/circle" title="Green circle">
</map>

The browser will interpret this code as follows:

Shape map Blue rectangle Green circle