The usemap attribute on <img> associates the image with a <map> in the same document. That map holds <area> hotspots — a client-side image map.
The value is a hash-name reference: it must start with # and match the map’s name (for example usemap="#planet-map"). Contrast with ismap (server-side coordinates). Related: shape, coords, href, alt.
Baseline · Widely available.
Not deprecated on <img>. Client-side image maps are stable across modern browsers since about July 2015 (and long before).
usemap on <object> is obsolete.
Use <img usemap> for image maps. Do not put usemap on <object>.
Syntax
HTML Syntax
syntax.html
<img usemap="#map-name" …>
Pair with <map name="map-name">…</map>. In JavaScript, the IDL property is img.useMap (camelCase).
usemap — browser uses <area> links in the document.
ismap — click appends ?x,y to the parent link’s URL.
Prefer usemap for accessible, self-contained regions.
Read img.useMap in script if you need to toggle maps dynamically.
Edge Cases & Pitfalls
Most bugs are a missing #, wrong map name, or coords that no longer match a resized image.
hash
Must start with #
usemap="planet-map" is wrong. Use usemap="#planet-map" to match name="planet-map".
coords
Coords are for intrinsic size
If CSS scales the image, hotspots can drift. Keep display size equal to width/height, or recalculate coords.
a11y
Provide alt on every area
Linked regions need text alternatives. Also give the img a clear alt.
object
Not on <object>
usemap on object is obsolete. Use img for client-side maps.
nav
Prefer real links when possible
Image maps are harder to maintain than a list of text links. Use maps for true spatial diagrams.
Compatibility
Browser Support
usemap on <img> is a core HTML attribute for client-side image maps. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
usemap
Supported in all major browsers for decades. Pair with map and area; keep coordinates aligned with the image’s intrinsic size.
97%Global support (approx.)
Google Chrome1+
Full support
Mozilla Firefox1+
Full support
Apple Safari1+
Full support
Microsoft Edge12+
Full support
Opera4+
Full support
Samsung InternetModern · Full
Full support
Internet Explorer1+
Supported
usemapWidely supported
Bottom line: Safe to use on img for diagrams and spatial nav. Prefer usemap over ismap for new work, and skip usemap on object.
Remember
Key Takeaways
Role: attach an img to a client-side <map>.
Value:#map-name matching <map name>.
Hotspots:<area> with shape, coords, href, alt.
Prefer over ismap for new, accessible maps.
One line:usemap="#name" connects an image to a <map> of clickable <area> regions defined in HTML.
Frequently Asked Questions
On an img, usemap points to a <map> in the same document. That map holds <area> elements that define clickable regions (client-side image map). The value is a hash-name reference such as #planet-map.
Use usemap on <img> for new work. usemap on <object> is obsolete — use img for image maps instead.
Write usemap="#name" on the image and name="name" on the map (no spaces). If the map also has an id, name and id should be the same value.
usemap defines regions in HTML with map/area. ismap is a server-side map: the image must be inside a link and click coordinates are sent as ?x,y. Prefer usemap for new pages.
Yes. Each area that is a link should have an alt describing the destination, just like linked images need meaningful alt.
No. Client-side image maps with usemap on img are Baseline widely available. Avoid usemap on object (obsolete), and prefer plain links when a simple nav will do.