Sunday, July 14, 2013

Image map

<html>
<body>

<p>
Click on one of the planets to watch it closer:
</p>

<img src="planets.gif"
width="145" height="126"
usemap="#planetmap">

<map id="planetmap" name="planetmap">

<area shape="rect"
coords="0,0,82,126"
alt="Sun"
href="sun.html">

<area shape="circle"
coords="90,58,3"
alt="Mercury"
href="mercur.html">


<area shape="circle"
coords="124,58,8"
alt="Venus"
href="venus.html">

</map>

<p><b>Note:</b> The "usemap" attribute in the img element refers to the "id" or "name" (browser dependant) attribute in
the map element, therefore we have added both the "id" and "name" attributes to the map element.</p>

</body>
</html>

No comments: