<map>

<map> defines an image map: regions associated with links through area. An image’s usemap fragment refers to the map’s name.

A fixed-size garden plan

The picture and coordinates use the same 240-by-120 CSS-pixel geometry. Each region links to a real section, with ordinary text links as another way to reach it.

Name and structure

name is required, nonempty, unique among maps in the document, and cannot contain whitespace. If you also use id, give it the same value. A map accepts content according to its surrounding context; areas must have a map ancestor.

An image using usemap must not be inside a link or button. Provide an overall image alt and useful alternatives for each linked area.

Size and accessibility

Coordinates are CSS pixels, not percentages. If CSS scales the displayed image, fixed coordinates can stop matching its regions; image maps do not automatically scale arbitrary coordinates for you. Test the actual size, zoom, keyboard focus, and assistive technology. Text links are often the simpler solution for responsive interfaces.

Tab through the example’s regions and links. Avoid tiny targets or making position and color the only way to understand a destination.

Sources and browser support

MDN: map describes the syntax and links to the specification and compatibility data. Check individual values in that table when supporting older browsers.