TAG:  area

<area> ... </area>
 
The area tag is used (along with the <map> tag) to create a client-side image map which is divided into two or more mouse-sensitive regions. When you click on a region in the map, an attribute contained in the area tag can direct an action to occur. For example, a hyperlink can be created in each region using the href attribute. When you click onto a region, the hyperlink will send you to a target page just like any link. Also, since the map is mouse-sensitive, the various onmouse cursor events can be very useful.
 
The area tag must be contained inside the map element. The separate closing tag is mandatory.
 
Attributes and Events
 
accesskey    class    dir    id    lang    onblur    onclick    ondblclick    onfocus    onkeydown    onkeypress    onkeyup    onmousedown    onmousemove    onmouseout    onmouseover    onmouseup    style    tabindex    title
 
Attributes
 
coords
The coords attribute defines the (x,y) coordinates of each shape in the image map. The coordinates are the x and y offset in pixels from the upper left corner (0,0) of the image. The number of coordinates you need to provide depends of the shape specified by the shape attribute.
 
href
The href attribute is the URL address for the link. Each area tag in the image map can have a link.
 
nohref
The nohref attribute specifies that the region defined by the area tag cannot be a link.
 
shape
The shape attribute defines the geometric shape of the image map. It can be a circle (circle or circ), polygon (polygon or poly), or a rectangle (rectangle or rect)
 
target - not allowed in strict XHTML
The target attribute specifies the name of the frame or window in which the target page should appear when a link is clicked. The four reserved names are _blank, _parent, _self, and _top.
 
The area and map tags are used on the DevGuru site to create image mapped links for the indexes to the various Quick References. For example, this is the code used for the ASP Quick Reference. These links are active and will take you to the ASP indexes.
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="eng">
<head>
<title>DevGuru XHTML area Tag Example</title>
</head>
<body>
<img border="0" src="images/asp_method_event_property.gif" usemap="#methodproperty" />
<br />
<map name="methodproperty">
<area shape="rect" coords="192,0,248,26" href="/technologies/asp/quickref/properties.html" />
<area shape="rect" coords="133,0,191,26" href="/technologies/asp/quickref/collections.html" />
<area shape="rect" coords="90,0,134,22" href="/technologies/asp/quickref/events.html" />
<area shape="rect" coords="43,0,89,22" href="/technologies/asp/quickref/methods.html" />
</map>
</body>
</html>

 
Output:



Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information