asp.net.ph

Skip Navigation Links

AREA Element | AREA Object

Language References


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

HTML Syntax

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.

AREA 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.

NOTE: Both start and end tags are required.

Attributes

The <area> element supports the following attributes, in addition to global attributes common to all HTML media 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
typecontent_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


See Also

IMG   MAP



© 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