Container element that holds area elements. Learn more →
<area> ElementThe area element defines clickable regions within an image map. Each area element specifies a shape, coordinates, and destination link, creating interactive hotspots on images without requiring multiple image files or complex JavaScript.
<area shape="rect" coords="x1,y1,x2,y2" href="link.html" alt="Description">The <area> element is void (self-closing) and must be a child of a <map> element.
Defines the type of clickable region:
| Shape | Description | Coordinates Format |
|---|---|---|
rect | Rectangle | x1,y1,x2,y2 (top-left, bottom-right) |
circle | Circle | x,y,radius (center x, center y, radius) |
poly | Polygon | x1,y1,x2,y2,x3,y3,... (each vertex) |
default | Entire image | No coordinates needed |
Specifies the coordinates of the clickable region. Format depends on shape:
<!-- coords: x1,y1,x2,y2 --><!-- x1,y1 = top-left corner --><!-- x2,y2 = bottom-right corner --><area shape="rect" coords="10,10,200,100" href="#link" alt="Rectangle">Example: coords="10,10,200,100" — Top-left corner: (10, 10), Bottom-right corner: (200, 100), Width: 190 pixels, Height: 90 pixels.
<!-- coords: x,y,radius --><!-- x,y = center point --><!-- radius = radius in pixels --><area shape="circle" coords="150,150,75" href="#link" alt="Circle">Example: coords="150,150,75" — Center point: (150, 150), Radius: 75 pixels, Diameter: 150 pixels.
<!-- coords: x1,y1,x2,y2,x3,y3,... --><!-- Each pair represents a vertex --><area shape="poly" coords="100,10,150,100,50,100" href="#link" alt="Triangle">Example: coords="100,10,150,100,50,100" — Vertex 1: (100, 10) top, Vertex 2: (150, 100) bottom-right, Vertex 3: (50, 100) bottom-left, forming a triangle.
<!-- No coords needed - covers entire image --><area shape="default" href="#link" alt="Entire image">Used as a fallback for areas not covered by other shapes.
Destination URL when the area is clicked:
Alternative text describing the area for accessibility:
<!-- Descriptive --><area shape="rect" coords="0,0,100,50" href="/products" alt="Go to Products page">
<!-- Action-oriented --><area shape="circle" coords="200,200,50" href="#signup" alt="Sign up for newsletter">
<!-- Context-aware --><area shape="poly" coords="50,0,100,50,0,50" href="/downloads" alt="Download software">
<!-- Empty for decorative --><area shape="rect" coords="300,0,400,50" href="#" alt=""><!-- Too vague --><area shape="rect" coords="0,0,100,50" href="/products" alt="Click here">
<!-- Missing alt --><area shape="circle" coords="200,200,50" href="#signup">
<!-- Repeats href --><area shape="poly" coords="50,0,100,50,0,50" href="/downloads" alt="/downloads">
<!-- Filename --><area shape="rect" coords="300,0,400,50" href="#" alt="map_region_4.png">| Attribute | Required | Description | Example |
|---|---|---|---|
shape | No | Shape type | rect, circle, poly, default |
coords | For most shapes | Region coordinates | "10,10,200,100" |
href | No | Link destination | "page.html", "#anchor", "mailto:" |
alt | Yes | Alternative text | "Navigate to Products" |
target | No | Where to open link | _blank, _self, _parent, _top |
download | No | Download file instead of navigating | download or download="filename.pdf" |
rel | No | Relationship to target | noopener, noreferrer, nofollow |
ping | No | URLs to ping when clicked | Space-separated URLs |
referrerpolicy | No | Referrer policy | no-referrer, origin, etc. |
Control where links open:
Force file download instead of navigation:
<map name="nav-map"> <!-- Action-oriented, describes purpose --> <area shape="rect" coords="0,0,100,40" href="/products" alt="Browse our product catalog">
<!-- Indicates destination clearly --> <area shape="rect" coords="120,0,220,40" href="/support" alt="Get customer support">
<!-- Describes action and result --> <area shape="rect" coords="240,0,340,40" href="/login" alt="Log in to your account"></map><map name="nav-map"> <!-- Too generic --> <area shape="rect" coords="0,0,100,40" href="/products" alt="Click here">
<!-- Just the link text --> <area shape="rect" coords="120,0,220,40" href="/support" alt="Support">
<!-- Missing alt entirely --> <area shape="rect" coords="240,0,340,40" href="/login"></map>Area elements are focusable by default:
| Feature | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
<area> element | 1+ | 1+ | 1+ | 12+ |
shape attribute | 1+ | 1+ | 1+ | 12+ |
coords attribute | 1+ | 1+ | 1+ | 12+ |
href attribute | 1+ | 1+ | 1+ | 12+ |
alt attribute | 1+ | 1+ | 1+ | 12+ |
target attribute | 1+ | 1+ | 1+ | 12+ |
download attribute | 14+ | 20+ | 10.1+ | 13+ |
ping attribute | 12+ | ❌ | 6+ | 17+ |
Container element that holds area elements. Learn more →
Image element that references the map. Learn more →