HTML <Area> Attribute and Its Example

HTML Area Attributes:

The HTML <area> tag element defines a sector or area in an image map. There are three types of areas: circular, rectangular or poligonal.The HTML <area> tag is used for defining an area in an image map.

Image map are commonly used toghether with images to specify zones for them, which are usually linked to other documents or resources. This element is used only within a <map> element.

Different regions of an image map can be hyperlinked to different locations by nesting multiple <area> elements in a single <map> element.

Each element defined a clickable area within an image map. The area is defined with the (required) shape and coords attributes. The shape attribute defines the shape of the area (rectangle, circle, or [polygon), and the coords indicates the size placement of the area over the image.

Area Attributes:



alt text Specifies an alternate text for the area

if shape="rect" then

if shape="circ" then

if shape="poly" then

Specifies the coordinates appropriate to the shape attribute to define a region of an image for image maps
href URL Specifies the URL of a page or the name of the anchor that the link goes to.
nohref true /false Excludes an area from the image map
shape rect
Specifies the shape of the image map
target _blank

Where to open the target URL.

  • _blank – the target URL will open in a new window
  • _self – the target URL will open in the same frame as it was clicked
  • _parent – the target URL will open in the parent frameset
  • _top – the target URL will open in the full body of the window
type mime_type Specifies the MIME (Multipurpose Internet Mail Extensions) type of the target URL