HTML <map> Tag
Description
The <map> element in HTML is used to define an image map, which is a collection of clickable areas on an image. Each clickable area can link to a different destination, making it possible to turn a single image into multiple interactive regions. The <map> itself does not display anything visually on the page; it serves as a container for defining the clickable areas through <area> elements.
The <map> tag is commonly paired with the <img> element using the <usemap> attribute, which references the name of the <map>. This creates a connection between the image and its defined interactive regions, allowing users to click on specific parts of the image to navigate to different URLs, trigger JavaScript actions, or perform other interactions.
Typical use cases for <map> include:
- Navigational graphics: Creating a map or diagram where different regions link to specific sections of a website.
- Interactive diagrams: Allowing users to click on different parts of an illustration to reveal information or trigger events.
- Games or educational tools: Creating clickable areas on images for quizzes, puzzles, or learning exercises.
The <map> element improves the accessibility and functionality of images, enabling developers to turn static images into interactive and informative components without breaking the layout. When used correctly, it ensures that all defined areas are clickable and that the experience works across devices that support mouse or touch interaction.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- Block and <area>
- Start/End Tags
- Start tag: required, End tag: required
Example
Attributes
- name
- Assigns a name to the image map.
Global Attributes
The <map> tag also supports the Global Attributes in HTML5
Event Attributes
The <map> tag also supports the Event Attributes in HTML5
Browser Support
The following information will show you the current browser support for the HTML <map> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.
This tag is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 26th December 2025
