HTML » Tags » area

Version: 3.2, 4.0

Compability: Explorer 4, 5  Netscape 4, 6

Syntax:
<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, you could also use any of the onmouse core attributes to capture a mouse event.

The area tag must be contained inside the map element. The closing tag is mandatory.
 

Examples

Code:
<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>
Explanation:

In this example, an image of a menu is displayed, and the area and map tags are used to create image mapped links to various indexes pages.

Language(s): HTML

See Also: