[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
HTMLSPEC-AREA

Area

Usage

Used to describe the clickable "hotspot" region of an image map. Note that the <area> tag must appear within the <map> element.

Attributes

href="URL"


Specifies the URL of the mapped document.

shape=""


Specifies the shape of the region inside the image to be "mapped". Shape is rect by default, and can be circle, poly, or default (Netscape only). The shape="" attribute must be accompanied with the coords="" attribute which defines the coordinates of the region mapped shape. rect takes values in the form: "left, top, right, bottom", circle takes values in the form: "x, y, radius", and poly takes values in the form: "x1, y1, x2, y2,..., xn, yn".

coords=""


Specifies the coordinates of the region in the image to be mapped.

alt="" (required"


Specifies a description of the destination URL of the image "hotspot".

nohref


Specifies that a particular region has no associate URL. nohref attributed elements should come first in a web document.

Code Tip

Image maps can be used very efficiently but can also be used incorrectly by implicit means. Be sure to specify the exact coordinates of image "hotspots" for an image. If specified incorrectly, the "hotspots" could run together and perform unexpected results.

Live Example

<html>
<head><title>AREA of MAP element Document Example</title></head>
<body>
<map name="areas">
<area shape="rect" coords="7,5,71,21" href="http://warebiz.tripod.com/cpp.htm">
<area shape="rect" coords="80,5,143,21" href="http://warebiz.tripod.com/html.htm">
<area shape="rect" coords="154,5,219,22" href="http://warebiz.tripod.com/qbasic.htm">
</map>
<img src="imgmapping.jpg" border=0 usemap="#areas">
</body>
</html> 


HTML Tags Center

last edited (April 12, 2004) by leeos, Number of views: 1604, Current Rev: 4 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.