The shape attribute on an <area> chooses the geometry of a clickable hotspot in an image map: rect, circle, poly, or default.
Pair it with coords (except for default). Put areas inside a <map>, and link the <img> with usemap="#map-name". Linked areas also need meaningful alt text.
Baseline · Widely available.
Not deprecated and not experimental. Stable image-map attribute across modern browsers since about July 2015.
Shape and coords must match.
Wrong formats (for example four numbers with circle) produce broken or ignored hotspots. Omit coords when shape="default".
Syntax
HTML Syntax
syntax.html
<area shape="rect|circle|poly|default" …>
Then add the matching coords (unless default), plus href and alt when the area is a link.
shape="poly" expects an even-length list of numbers.
Three pairs form a triangle: bottom-left, top-center, bottom-right.
Browser closes the polygon if the first and last points differ.
Use for irregular regions that rectangles and circles cannot cover cleanly.
Edge Cases & Pitfalls
Most image-map bugs come from mismatched shape/coords or scaled images.
pair
Match shape to coords format
rect needs 4 numbers, circle needs 3, poly needs pairs. Mixing them breaks the hotspot.
default
default skips coords
shape="default" is the leftover image region. Omit coords for that area.
scale
CSS scaling can misalign hits
Coordinates are based on the image’s intrinsic pixel grid. Prefer matching width/height attributes to the map.
a11y
alt is required when href is set
Describe the same choice the visual hotspot offers. Empty or missing alt hurts keyboard and screen reader users.
order
Earlier areas win overlaps
If shapes overlap, the first matching <area> in the map usually takes the click. Put specific shapes before default.
Compatibility
Browser Support
shape is an attribute of the HTML <area> element in client-side image maps. It is not a Node.js API.
✓ Baseline · Widely available
shape
Widely available since about July 2015. Supported across modern browsers for rect, circle, poly, and default.
98%Global support (approx.)
Google ChromeAll modern
Full support
Mozilla FirefoxAll modern
Full support
Apple SafariAll modern
Full support
Microsoft EdgeAll modern
Full support
OperaAll modern
Full support
Samsung InternetModern
Full support
Internet ExplorerLegacy support
Supported
shapeWidely supported
Bottom line: Safe to use for image maps. Keep width/height stable, pair shape with the correct coords, and always provide alt on linked areas.
Remember
Key Takeaways
Role: pick hotspot geometry on <area>.
Values:rect, circle, poly, default.
Wiring:<map> + usemap on <img>.
A11y: linked areas need clear alt text.
One line:shape picks the hotspot type — coords fills in the numbers.
Frequently Asked Questions
On an area element inside a map, shape chooses the hotspot geometry: rect (rectangle), circle, poly (polygon), or default (the whole image beyond other areas).
Only area (inside map). The image links to the map with usemap. Do not put shape on img.
rect uses x1,y1,x2,y2. circle uses x,y,radius. poly uses x1,y1,x2,y2,... (at least three pairs). default omits coords.
It covers the remaining image region after other areas. Use it for a catch-all link. Do not set coords with default.
When the area has href, provide meaningful alt text so keyboard and assistive-tech users get the same choice the image offers.
Image maps with shape are Baseline widely available. Hotspots can misalign if CSS scales the image without matching coordinates.