MDN self-hosted library · e01.org

Add a hitmap on top of an image

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<img src="image-map.png" alt="" usemap="#example-map-1" />
html
<map name="example-map-1"> </map>
html
<map name="example-map-1">
  <area
    shape="circle"
    coords="200,250,25"
    href="page-2.html"
    alt="circle example" />

  <area
    shape="rect"
    coords="10, 5, 20, 15"
    href="page-3.html"
    alt="rectangle example" />
</map>