HTML: Map tag

The <map>….</map> tag is used to define a client-side image-map. An image-map is an image with clickable areas.

The <map>…. </map> tag contains a number of <area> tags, that defines the clickable areas in the image map.

<map name=“mapname” id=“mapname”>……… </map>

Area Tag

The <area> tag defines an area inside an image-map. An image-map is an image with clickable areas.

The <area> element is always nested inside a <map>….</map> tag.

AttributeValueDescription
alttextSpecifies an alternate text for the area. Required if the href attribute is present
coordscoordinatesSpecifies the coordinates of the area
downloadfilenameSpecifies that the target will be downloaded when a user clicks on the hyperlink
hrefURLSpecifies the hyperlink target for the area
hreflanglanguage_codeSpecifies the language of the target URL
mediamedia querySpecifies what media/device the target URL is optimized for
shapedefault
rect
circle
poly
Specifies the shape of the area
target_blank
_parent
_self
_top
framename
Specifies where to open the target URL
typemedia_typeSpecifies the media type of the target URL
relalternate
author
bookmark
help
license
next
nofollow
noreferrer
prefetch
prev
search
tag
Specifies the relationship between the current document and the target URL

Coords attribute:

Tagged : / / / /