Skip to main content
HTML Validation

The hash-name reference in attribute “usemap” referred to X, but there is no “map” element with a “name” attribute with that value.

About This HTML Issue

An image's usemap attribute points to a <map> by name, and the page has no <map> whose name matches the text after the #.

The value of usemap is a hash-name reference: a # followed by the name of a <map> element in the same document. The <area> elements inside that map define the clickable regions of the image, so usemap="#floor-plan" needs a <map name="floor-plan"> somewhere on the page.

The validator compares the two values exactly, so <map name="Floor-Plan"> doesn't match. A name that repeats the # (name="#floor-plan") doesn't match either, because the # belongs only in usemap. And a <map> with only id="floor-plan" won't do: name is required on <map>, and the validator reports its absence as a separate error.

If the page has no matching map at all, browsers show a plain image with no clickable regions, and visitors never see the links the map was supposed to provide. This often happens when an image is copied from another page, or inserted by a CMS, without the <map> that went with it.

Add the missing <map>, or fix the existing map's name so it matches the usemap value character for character. If the image doesn't need clickable regions, remove the usemap attribute instead.

Invalid example

<img src="floor-plan.png" alt="Office floor plan" width="400" height="300" usemap="#floor-plan">
<map name="Floor-Plan">
  <area shape="rect" coords="0,0,200,300" href="/rooms/kitchen" alt="Kitchen">
  <area shape="rect" coords="200,0,400,300" href="/rooms/meeting-room" alt="Meeting room">
</map>

Valid example

<img src="floor-plan.png" alt="Office floor plan" width="400" height="300" usemap="#floor-plan">
<map name="floor-plan">
  <area shape="rect" coords="0,0,200,300" href="/rooms/kitchen" alt="Kitchen">
  <area shape="rect" coords="200,0,400,300" href="/rooms/meeting-room" alt="Meeting room">
</map>

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
€5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly →

Join teams across 40+ countries