Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Area object

HTML DOM Area object


Area Object

The Area object represents a region of an image map (an image map refers to an image with clickable areas)

In an HTML document, An Area object is created each time the tag appears.


Area object properties

W3C: W3C standard:

property Description W3C
alt Sets or returns the replacement text when the browser cannot display a certain area. Yes
coords Sets or returns the coordinates of the clickable area in the image map. Yes
hash Sets or returns the anchor part of the URL in a certain area. Yes
host Sets or returns the host name and port of the URL in a certain area. Yes
hostname Sets or returns the host part of the href attribute value. Yes
href Sets or returns the href attribute value in a certain area Yes
noHref Sets or returns the nohref attribute value of a certain area. Yes
pathname Sets or returns the pathname part of the href attribute value of a certain area. Yes
port Sets or returns the port part of the href attribute value of a certain area. Yes
protocol Sets or returns the protocol part of the href attribute value of a certain area. Yes
search Sets or returns the query string part of the href attribute value of a certain area. Yes
shape Sets or returns the shape attribute value of a certain area. Yes
target Sets or returns the target attribute value of a certain area. Yes

Standard properties and events

The Area object also supports standard property and Events.