HTML4 HTML5
Defines a clickable area (e.g., rectangle, circle, or polygon) inside an image map (the <map> element). Allows assigning hyperlinks to specific parts of a single image.
The tag is self-closing (has no closing tag).
Attributes:
shape="..." - Shape of the area: rect (rectangle), circle (circle), poly (polygon), or default (entire region).
coords="..." - Coordinates defining the location and dimensions of the area in pixels.
href="..." - Hyperlink URL when clicking the area.
alt="..." - (Required when href is present) Alternative text describing the area.
Code:
The browser will interpret this code as follows: