1. Home
  2. Computing & Technology
  3. Web Design / HTML

<area /> -

By Jennifer Kyrnin, About.com

< Previous | HTML 4.01 Tags / XHTML 1.0 Elements | Next >

Free XHTML 1.0 Class | HTML Validators | Free HTML 4.01 Class

<area /> Description:

Defines the clickable area in an imagemap.

<area /> Web Browser Support:

<area /> Attributes:

All attributes are optional unless indicated.

<area /> End Tag:

None. <area /> is a singleton tag

<area /> Contents:

None.

<area /> Valid Context:

The <area /> tag is valid within the following tags:
map

<area /> Usage:

  • rectangle area
    <area shape="rect" href="http://webdesign.about.com/" coords="0,0,10,20" />
    Note, the coordinates - the first is the upper left corner (0,0) and the second is the lower right corner (10,20). View

  • circle area
    <area shape="circle" href="http://webdesign.about.com/" coords="0,10,8" />
    Note, the coordinates - the first coordinate is the center of the circle (0,10) and the second number is the radius (distance from the center) (8) in pixels. View

  • polygon area
    <area shape="poly" href="http://webdesign.about.com/" coords="10,0,20,10,0,10,10,0" />
    Note, the coordinates - there can be any any number of coordinates. In this map there are three - 10,0 20,10 0,10 - to create a triangle. The final coordinate closes the triangle by repeating the first coordinate. View

  • default area
    <area shape="default" nohref="nohref" />
    In this area, the default area is not clickable and so uses the nohref attribute. View

<area /> Special Notes

  • Remember to use the trailing slash in your area tag - but precede it with a space so that less-compliant browsers aren't confused.
  • Many older browsers don't support the shape="poly" attribute. Use this option with care.
  • Some voice and text browsers don't support client-side image maps, so it's a good idea to use alternative navigation on your page as well.
  • If the radius of the circle is a percentage, the browsers should calculate the final value based on the object's width and height. The radius will be the smaller of the two.
  • With a polygon, it's good practice to repeat the first coordinates at the end of the list - to close the shape.
  • It's usually easier to create an image map with an editor than by hand - there are lots of image map editors available, some are even free.

More <area /> Information

Return to XHTML Element (HTML Tags) Library

< Previous | HTML 4.01 Tags / XHTML 1.0 Elements | Next >

Free XHTML 1.0 Class | HTML Validators | Free HTML 4.01 Class

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. Web Design
  5. Graphics
  6. Image Maps
  7. The area Element - image maps - XHTML 1.0 HTML 4.0

©2008 About.com, a part of The New York Times Company.

All rights reserved.