HTML <map> tag

Updated: 10/11/2017 by Computer Hope

HTML map tagWhen writing in HTML, 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, as well as related attributes and browser compatibility.

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

Example 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

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows the only current, unique, HTML attribute for the <map> tag.

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

Compatibility

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

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