HTML <map> name Attribute

❮ HTML <map> tag

Example

An image map, with clickable areas:

<img src="workplace.jpg" alt="Workplace" usemap="#workmap" width="400" height="379">

<map name="workmap">
  <area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
  <area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm">
  <area shape="circle" coords="337,300,44" alt="Cup of coffee" href="coffee.htm">
</map>
Try it Yourself »

Definition and Usage

The required name attribute specifies the name of an image map.

The name attribute is associated with the <img>'s usemap attribute and creates a relationship between the image and the map.


Browser Support

Attribute
name Yes Yes Yes Yes Yes

Syntax

<map name="mapname">

Attribute Values

Value Description
mapname The name of the image map

❮ HTML <map> tag
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.