Client-Side Image Maps Using the <object> Element

asianmartt

New member
HTML 4 started to promote the use of the <object> element rather than the <map> element for adding image maps to your documents (although you can still use the <map> element in Strict XHTML 1.0). The <object> element takes a different approach to creating image maps.

It is the <object> element that carries the usemap attribute (whose value is the value of the name attribute on the <map> element preceded by the pound or hash sign). Inside the <object> element you use the familiar <map> element with the name attribute. But inside the <map> element are standard <a> elements.

The presence of the <a> element in this context helps explain why it can carry attributes such as shape and coords.



<object data="gallery_map.gif" type="image/gif" alt="Gallery Map" width="500"
height="300" border="0" usemap="#gallery" />
<map name="gallery">
<a shape="circle" coords="154,150,59" href="foyer.html" target="_self">
Foyer</a>
<a shape="poly" coords="272,79,351,79,351,15,486,15,486,218,272,218,292,166,
292,136,270,76" href="sculpture_garden.html" target="_self">Sculpture
garden
</a>
<a shape="rect" coords="325,224,488,286" href="workshop.html"
target="_self">
Artists workshops</a>
</map>





Zero Addiction Powder
Dhan Laxmi Yantra
 
Back
Top