img usemap Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:img

Description

The usemap attribute specifies an image as a client-side image-map.

Attribute Values

ValueDescription
#mapname A hash character ("#") plus the name of the <map> element to use

An image-map, with clickable areas:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p>Click on the sun or on one of the message to watch it closer:</p>

<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><!--from  w  ww  .ja v  a  2 s.  co  m-->

</body>
</html>

Related Tutorials