HTML <map> tag

Updated: 06/30/2020 by Computer Hope
HTML map tag

When writing in HTML (hypertext markup language), the <map> tag is used with the <area> element to designate a client-side image map on a web page. It is useful when you want an image on your page to have multiple hyperlinks. The following sections contain information about the <map> tag, including an example of it in use, and related attributes and browser compatibility.

Note

The <area> element must be nested inside a <map> tag.

Example of <map> code

<img src="https://www.computerhope.com/cdn/computer-hope.jpg" alt="Computer 
Hope logo" width="412" height="82" usemap="#CHmap" class="logo"/>
<map name="CHmap">
<area shape="rect" coords="89,9,294,50" href="../c/computer.htm" alt="Computer">
<area shape="rect" coords="297,7,407,54" href="hope.htm" alt="Hope">
</map>

Example result

Computer Hope logo Computer Hope

In the image above containing our logo, clicking the word "Computer" opens our computer definition page; clicking the word "Hope" opens our hope definition page.

Attributes

All HTML tags support standard attributes that define the settings of an HTML element. In addition to the standard settings, the <map> tag has the following unique attributes.

Attribute Description
name Designates the name of an image map (required).

Compatibility

Edge Internet Explorer Firefox Safari Opera Chrome
All versions All versions All versions All version All versions All versions

Browser, Client-side, Compatibility, Container tag, HTML a tag, Hyperlink, Logo, Target, URL, Web design terms