asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Elements > AREA Element

<area> Element


Defines a clickable area, or hotspot, within a client-side image <map>.HTML 2, 3.2, 4, 4.01, 5

HTML Syntax

NOTE: Both start and end tags are required.

Remarks

A hotspot is an invisible region on a graphic that is assigned a hyperlink. When a site visitor clicks the region, the destination of the hyperlink opens in the browser.

A hotspot can take the shape of a rectangle, circle, or polygon.

The <area> element describes an individual hotspot region in the image map. The element defines the shape, coordinates, and associated URL of one hyperlink region.

area can only be used inside a <map> element. Any number of area elements may be contained within the same map element.

The coords attribute is required. The format of the coords value is dependent upon the value of the shape attribute.

Also, either the href or the nohref attribute must be supplied.

Attributes

The <area> element supports the following attributes, in addition to global attributes common to all HTML elements.

AttributeValueDescription
alttextSpecifies an alternate text for the area. Required if the href attribute is present
coordscoordinatesSpecifies the coordinates of the area
downloadfilenameSpecifies that the target will be downloaded when a user clicks on the hyperlink
hrefURLSpecifies the hyperlink target for the area
hreflanglanguage_codeSpecifies the language of the target URL
mediamedia querySpecifies what media/device the target URL is optimized for
referrerpolicyno-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin-when-cross-origin, unsafe-urlSpecifies which referrer information to send with the link
relalternate, author, bookmark, help, license, next, nofollow, noreferrer, prefetch, prev, search, tagSpecifies the relationship between the current document and the target URL
shapedefault, rect, circle, polySpecifies the shape of the area
target_blank, _parent, _self, _top, framenameSpecifies where to open the target URL
typemedia_typeSpecifies the media type of the target URL

Example

The following example provides the full code for an image map of the solar system. Clicking on the sun or any planet opens a link to an individual image.

Sample Code

External References

See Also

IMG   MAP



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note