<map>...</map>

HTML4 HTML5

Used to create an active image map[cite: 3]. It allows defining clickable areas on an image (using <area> tags) that point to various links[cite: 3].

Both opening and closing tags are mandatory[cite: 3].

Attributes:

Example

Code:

<img src="https://picsum.photos/id/1062/300/200" alt="Dog and cat" usemap="#petmap"> <map name="petmap"> <area shape="rect" coords="0,0,150,200" href="#dog" alt="Dog"> <area shape="rect" coords="150,0,300,200" href="#cat" alt="Cat"> </map>

The browser will interpret this code as follows:

Dog and cat Dog Cat