Pr.Pg Next Pg

<AREA> tag tutorials

  • The HTML <area> element defines a hot-spot region on an image, and optionally associates it with a hypertext link.

  • The <area> element is always nested inside a <map> tag.

  • Attributes of <AREA> tag are below:

 

Sr No

Attributes

Descriptions

1

ALT

This attributes specifies an alternate text for the area, Required if the href attribute is present.

2

COORDS

This attributes specifies the coordinates of the area.

3

NOHREF

This attributes specifies that an area has no associated link.

4

HREFLANG

This attributes specifies the language of the target URL

5

MEDIA

This attributes specifies what media/device the target URL.

6

REL

This attributes specifies the relationship between the current document and the target URL.

7

SHAPE

This attribute specifies the shape of the area

8

TARGET

This attribute specifies where to open the target URL.

9

TYPE

This attribute specifies the MIME type of the target URL.

 

Syntax

<body>

<map>

<area attributes=value…>

</map>

<body>

 

Example: HTML program to map a area of a particular object and on clicking that object open the Wikipedia of that object

Output:
Note: If you run the same example in Internet Explorer then it will show ALT message if you move the mouse over the image as below:

Note: Now move the mouse to the over acronym

Pr.Pg border                                              Next Pg