Using the object Element to Create Client-Side Image Maps - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:object

Introduction

You can use the object element to create client-side image maps.

The usemap attribute can be used to associate a map element with an object element.

Creating a Client-Side Image Map with the object Element

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
   </head> 
   <body> 
      <map name="mymap"> 
         <area href="#" shape="rect" coords="3,5,68,62" alt="Swimming"> 
         <area href="#" shape="rect" coords="70,5,130,62" alt="Running"> 
         <area href="#" shape="default" alt="default"> 
      </map> 
      <object data="http://java2s.com/resources/g.png" type="image/png" usemap="#mymap"> </object>  
   </body><!--from w w w.j av a  2  s .com-->
</html>

Related Tutorials