In HTML, <map> tag is used for
20202025
In HTML, <map> tag is used for
- A.
defining a path between two nodes in an image
- B.
defining clickable region in an image
- C.
highlighting an area in an image
- D.
defining the site-map of a web-site
Attempted by 393 students.
Show answer & explanation
Correct answer: B
Answer: defining clickable region in an image
Explanation: The <map> element creates an image map — a collection of interactive areas inside an image. Each clickable area is defined with an <area> element that specifies a shape (rect, circle, polygon), coordinates, and a target URL. The image references the map using the usemap attribute.
How to use it:
Define the map with a name and include <area> elements (shape and coords define each clickable region).
Reference the map from an <img> using usemap="#mapname" so the image uses those clickable areas.
Notes:
The <map> element defines interactivity, not visual highlighting. For drawing or visual paths use SVG (for example, the <path> element) or canvas; for sitemaps use XML/HTML documents.