usemap
Connects an img to a named map.
Learn Image Map with practical HTML examples for navigation, images, alt text, media behavior, metadata, accessibility, SEO and live practice.
HTML links and media
An image map combines an img element with a map element and one or more area elements. Each area defines a clickable shape on the image.
Image maps can be useful for diagrams, maps, floor plans or legacy interfaces, but they are not the default choice for modern responsive layouts.
If you use an image map, every clickable area needs clear alternative text and the coordinates must still work at the displayed image size.
Connects an img to a named map.
Defines the clickable area collection.
Defines one clickable shape inside the image.
Pixel coordinates that define the clickable region.
Syntax and structure
The usemap value starts with #. The map name does not.
<img src="course-map.webp" alt="Course map with HTML, CSS and JavaScript areas" usemap="#course-map"> <map name="course-map"> <area shape="rect" coords="0,0,200,160" href="#html-course" alt="Show HTML course details"> <area shape="rect" coords="200,0,400,160" href="#css-course" alt="Show CSS course details"> </map>
<img src="map.jpg" usemap="#map"> <map name="map"> <area coords="0,0,200,200" href="#"> <area coords="200,0,400,200" href="#"> </map>
Rules that matter
Clickable and visual HTML affects how people move, scan, trust and share a page. The details are small, but the user experience impact is large.
The img usemap="#course-map" connects to map name="course-map".
Each clickable region needs text that explains the destination.
Coordinates can become inaccurate when images scale.
Cards, buttons or SVG links are often easier to maintain.
Image maps fit content where clickable regions are naturally spatial.
Clickable regions must be reachable and understandable.
Production thinking
This matters because image maps look simple but hide a lot of interaction inside one image. Without labels and testing, users may not know what is clickable.
Area alt text is critical because invisible clickable regions otherwise have no meaningful label.
Use image maps carefully. Responsive behavior, analytics and maintenance can become awkward compared with normal links or SVG.
Image map links can be followed, but normal visible links with clear text are usually easier for users and crawlers.
Live code lab
Edit the HTML or CSS, then use Run to refresh the preview. The preview is isolated, so links and forms stay inside this practice area.
Mini assignment
Practice assignment
Try it yourself
Self-check
Do not only read this page. Answer these questions out loud or write the answers in your own notes. If one answer feels vague, revisit the examples before moving on.