Thursday, February 5, 2009

HTML Map Tag

Example:An image map, with clickable areas:
<img src ="planets.gif" width="145" height="126" alt="Planets" usemap ="#planetmap" />
<map id ="planetmap" name="planetmap">
<area shape ="rect" coords ="0,0,82,126" href ="sun.htm" alt="Sun">
<area shape ="circle" coords ="90,58,3" href ="mercur.htm" alt="Mercury"> <area shape ="circle" coords ="124,58,8" href ="venus.htm" alt="Venus">
</map>
--------------------------------------------------------------------------------
Definition and Usage
The area tag defines a region in an image map.
The area element is always nested inside a map tag.
--------------------------------------------------------------------------------
Browser Support
The area tag is supported in all major browsers.
--------------------------------------------------------------------------------
Differences Between HTML and XHTMLIn HTML the tag has no end tag.
In XHTML the area tag must be properly closed.
--------------------------------------------------------------------------------
coords

if shape="rect" thencoords="left,top,right,bottom"
if shape="circ" thencoords="centerx,centery,radius"
if shape="poly" thencoords="x1,y1,x2,y2,..,xn,yn"

No comments: