object usemap Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:object

Description

The usemap attribute specifies the name of an image-map to use with the object.

Attribute Values

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

The following code shows how to create An <object> element using an image map:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<object data="https://www.java2s.com/style/demo/Opera.png" width="145" height="126" usemap="#myMap"></object>

<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 w  w .j a v  a2 s  .c om-->

</body>
</html>

Related Tutorials