area

Defines a clickable region within a map element using pixel-based shape coordinates. Used with img and map for client-side image maps.

Description

The <area> element defines a single clickable region inside an image map. It is always a child of a <map> element. Each area specifies a shape, pixel-based coords, and a destination href.

The <area> element is a void element — it has no closing tag and cannot contain child content. Tooltip text is limited to the title attribute (plain text only).

Live Demo

Hover over a room to see its title tooltip. Click to see the area name. The image renders at its native 800×500 pixels so the pixel-based coordinates align correctly.

Shape Types

The shape attribute determines how coords are interpreted. All coordinate values are in absolute pixels relative to the image’s natural dimensions.

Rectangle

Defined by the top-left and bottom-right corners: left, top, right, bottom.

Circle

Defined by a centre point and radius: center-x, center-y, radius.

Polygon

Defined by a series of x,y coordinate pairs. Minimum three points. The polygon closes automatically.

Default

Covers the entire image surface not claimed by other areas. Useful as a catch-all link.

ShapeCoords formatExample
rectleft, top, right, bottom40,40,320,220
circlecx, cy, radius500,160,80
polyx1,y1, x2,y2, ...480,280,760,280,...
default(none)

Attributes

AttributeTypeRequiredDescription
shape string Yes rect, circle, poly, or default
coords string Yes* Comma-separated pixel coordinates. Not needed for shape="default".
href URL No Navigation target. Without href, the area is not interactive.
alt string Yes** Accessible text label. Required when href is present.
target string No Link target: _self, _blank, _parent, _top
download string No Triggers a download instead of navigation. Value sets the filename.
rel string No Link relationship (noopener, noreferrer, etc.)
title string No Tooltip text shown on hover. Plain text only.

The Responsive Problem

The <area> coordinate system uses absolute pixel values matching the image’s natural dimensions. When the image scales responsively (as it does in every modern layout), the clickable regions no longer align with the visual regions.

For example, an area defined at coords="40,40,320,220" targets pixels 40–320 horizontally. If the image renders at half width (400px instead of 800px), those coordinates still reference the 800px space, and clicks land in the wrong place.

Accessibility

  • Every <area> with an href must have an alt attribute
  • Screen readers announce alt text as the link label
  • Users navigate between areas with Tab
  • No visible focus indicator exists on native areas — keyboard users cannot see which region has focus
  • The title attribute provides hover tooltips but is not reliably announced by screen readers — do not use it as the sole accessible name

Related

  • <map> — container element that groups <area> elements
  • <img> — the image element linked via usemap
  • <a> — standard hyperlink (simpler alternative for single-link images)
  • <image-map> — modern responsive replacement with percentage coordinates and rich tooltips