Codectionary / Developer documentation / HTML

<map> and <area>

Image maps let different regions of a single image act as separate clickable links. The <map> element defines the map, referenced from an <img> via its usemap attribute, and each <area> inside it defines one clickable region using coordinates and a shape.

Syntax

<img src="image.jpg" usemap="#map1">
<map name="map1">
  <area shape="rect" coords="0,0,100,100" href="/page1">
</map>

Examples

Rectangular Regions

A simple image map with rectangular clickable areas.

<img src="nav-diagram.png" usemap="#navmap" alt="Site navigation diagram">
<map name="navmap">
  <area shape="rect" coords="0,0,150,50" href="/home" alt="Home">
  <area shape="rect" coords="150,0,300,50" href="/about" alt="About">
</map>

Circular Region

Defining a circular clickable area.

<img src="world-map.png" usemap="#continents" alt="World map">
<map name="continents">
  <area shape="circle" coords="200,150,40" href="/europe" alt="Europe">
</map>

Polygon Region

Defining a custom-shaped clickable area.

<map name="shapes">
  <area shape="poly" coords="50,10,90,90,10,90" href="/triangle-info" alt="Triangle">
</map>

Attributes

  • name (string): Used on map; must match the img's usemap value
  • usemap (string): Used on img; references a map by name, prefixed with #
  • shape (rect | circle | poly | default): Used on area; the shape of the clickable region
  • coords (string): Used on area; coordinates defining the region's boundaries

Best practices

  • Always include alt text on each area for accessibility, same as a regular link
  • Consider whether separate, individually styled elements (like a CSS grid of linked images) would be simpler than coordinate-based regions
  • Image maps do not scale coordinates automatically with responsive images — test carefully on different screen sizes
  • Keep coordinate math simple by using rect and circle shapes where possible rather than complex polygons

Browser compatibility

Support applies to the named feature, not every attribute or behaviour in this article. Versions refer to browsers, not operating systems.

<map>

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
From 1
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
From 1
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1 · Before Firefox 5, in Quirks Mode, empty maps were no longer skipped over in favor of non-empty ones when matching. · Before Firefox 17, the default styling of the <map> HTML element was display: block;. This is now display: inline; and matches the behavior of the other browsers. It was already the case in Quirks Mode.

Safari

  • From 1

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • From 1

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<area>

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
From 1
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
From 1
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • From 1

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • From 1

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<map> name

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
From 1
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
From 1
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • From 1

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • From 1

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<img> usemap

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
From 3
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
From 2
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • From 3

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • From 2

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<area> shape

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
From 1
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
From 1
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • From 1

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • From 1

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<area> coords

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
From 1
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
From 1
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • From 1

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • From 1

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0

MDN BCD 8.1.5 · Dataset built 2026-10-08 · Mapping reviewed 2026-10-21. These dates are not individual browser-test or claim-verification dates. Unknown means the data does not establish support.

HTML Living Standard

Specifications & further reading