The HTML usemap attribute
Quick answer
The HTML usemap attribute associates the element with a client-side image <map> by its name. It is used on the <img> and <object> elements.
Overview
The usemap attribute associates the element with a client-side image <map> by its name. It applies to the <img> and <object> elements.
Image maps are valid but rarely the best tool today — overlaid links or SVG are usually more flexible and accessible.
Syntax
<img src="map.png" usemap="#planets" alt=""><map name="planets"> … </map>
Values
| Value |
|---|
A hash-prefixed map name, e.g. #planets. |
Best practices
Frequently asked questions
What does the usemap attribute do?
Links an image to a client-side image map.