HTML CSS examples for HTML Tag:map
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.
Value | Description |
---|---|
mapname | The name of the image-map |
The following code shows how to add an image-map, with clickable areas:
<!DOCTYPE html> <html> <body> <img src="https://www.java2s.com/style/demo/Opera.png" width="145" height="126" alt="message" usemap="#myMap"> <map name="myMap"> <area shape="rect" coords="0,0,80,100" alt="A" href=""> <area shape="circle" coords="90,60,5" alt="B" href=""> <area shape="circle" coords="130,60,10" alt="C" href=""> </map><!-- www. java 2 s . c o m--> </body> </html>