Clickable Image Map
The <map> + <area> duo creates clickable regions on an <img> without slicing the image. Useful for diagrams, floor plans, and any graphic where different regions mean different things.
Solar System — click a planet
Hover over each planet to see the area outline. Click opens the Wikipedia page.
How it works
<img src="diagram.png" usemap="#my-map" alt="...">
<map name="my-map">
<area shape="rect" coords="10,20,90,80" alt="A" href="a.html">
<area shape="circle" coords="150,60,30" alt="B" href="b.html">
<area shape="poly" coords="200,10 290,50 200,90" alt="C" href="c.html">
</map>
Three area shapes
| Shape | coords format | Example |
|---|---|---|
rect | left,top,right,bottom | "10,20,90,80" |
circle | cx,cy,radius | "150,60,30" |
poly | x1,y1 x2,y2 ... xn,yn | "200,10 290,50 200,90" |
Accessibility note
- Every
<area>must have a descriptivealt— screen readers announce it when the area gets focus. - Keep shapes simple and non-overlapping. If they must overlap, the first matching area wins.
- Use
tabindex="0"on areas to make them keyboard focusable in some browsers.
Image maps have fallen out of fashion with most web design — clickable SVG is usually more flexible and accessible. But they're still useful for non-SVG images (photos, legacy diagrams) where slicing would be wasteful.