The Area Tag

ken's picture

Opening Tag: <AREA>
Closing Tag: -

Purpose
The area tag is used in conjunction with the 'map' tag, in order to create image maps. An image map defines an image so that different parts of the image can link to different resources. The area tag is used to define the regions of the image and associate a link to them. Warning: Image Maps can be very tricky to set up manually - we advise you use a WYSIWYG editor such as Dreamweaver to generate the co-ordinates for you.

Attributes
alt=string
- Alternative text for the area being defined.

coords=X,Y
- The co-ordinates of the clickable shape within the image. Co-ordinates are measured from the top left corner and counted in pixels. The number and order of these co-ordinates depend on the shape being defined - while a rectangle may simply have 2 co-ordinates, a more complicated polygon may have more.

href=url
- The address of the resource that this region of the image should point towards.

nohref
- When no resource is to be associated with the region.

shape=string
- Defines the shape of the image map. Options are;
RECT - For a Rectangle
CIRCLE - For a Circle!
POLY - For a Polygon.

Example
<MAP Name="sample">
<AREA href="http://www.webguruguide.com" shape="rect" coords="0,0,50,60">
</MAP>
<img src="Picture.jpg" usemap="#sample">

Related Tags:

-

Back to:
Alphabetical Guide
Guide By Type