<Area> is an element used within the content model of the <MAP> element to implement client-side image maps. It defines a hot-spot region on the map and associates it with a hypertext link.
Syntax
<area
accesskey="character"
alt="alternative text"
class="class name"
coords="comma-separate list of values"
href="Url"
ID="Unique alphanumeric identifier"
nohref
shape="circle | default | poly | rect"
style="style information"
tabindex="number"
target="_blank | _parent | _self | _top | frame-name"
title="advisory text"
onblur="script"
onclick="script"
ondblclick="script"
onfocus="script"
onkeydown="script"
onkeypress="script"
onkeyup="script"
onmousedown="script"
onmousemove="script"
onmouseout="script"
onmouseover="script"
onmouseup="script">
Attributes
ACCESSKEY | This attribute specifies a keyboard navigation accelerator for the element. Pressing ALT or a similar key in association with the specified character selects the form control correlated with that key sequence. |
ALT | This attribute contains a text string alternative to display on browsers than cannot display images. |
CLASS | This attribute is set to indicate the class or classes that a particular element belongs to. A class name is used by a style sheet to associate style rules to multiple elements at once. |
COORDS | For use with object shapes, this attribute uses a comma-separated list of numbers to define the coordinates of the object on the page. |
HREF | This attribute specifies the hyperlink target for the area. Its value is a valid URL. Either this attribute or the NOHREF attribute must be present in the element. |
ID | This attribute specifies a unique alphanumeric identifier to be associated with an element. Naming an element is important to being able to access it with a style sheet, a link, or a scripting language. Names should be unique to a document and should be meaningful. |
NOHREF | This attribute indicates that no hyperlink exists for the associated area. Either this attribute or the HREF attribute must be present in the element. |
SHAPE | This attribute defines the shape of the associated hot spot. HTML 4 defines the values RECT, which defines a rectangular region; CIRCLE, which defines a circular region; POLY, which defines a polygon; and DEFAULT, which indicates the entire region beyond any defined shapes. |
STYLE | This attribute specifies an inline style associated with the element. The style information is used to determine the rendering of the affected element. |
TABINDEX | This attribute represents a numeric value specifying the position of the defined area in the browser tabbing order. |
TARGET | This attribute specifies the target window for a hypertext source link referencing frames. The information linked to will be displayed in the named window. Frames must be named to be targeted. There are special name values, including _blank, which indicates a new window; _parent, which indicates the parent frame set containing the source link; _self, which indicates the frame containing the source link; and _top, which indicates the full browser window. |
TITLE | This attribute supplies advisory text for the element that may be rendered as a tool tip when the mouse is over the element. A title may also simply provide information that alerts future document maintainers to the meaning of the element and its enclosed content. |
Event Handlers
onblur | Occurs when an element loses focus, meaning that the user has moved focus to another element, typically either by clicking the mouse on it or tabbing to it. |
onclick | Indicates that the element has been clicked. |
ondblclick | Indicates that the element has been double-clicked. |
onfocus | The focus event describes when an element has received focus, namely, it has been selected for manipulation or data entry. |
onkeydown | Indicates that a key is being pressed down with focus on the element. |
onkeypress | Describes the event of a key being pressed and released with focus on the element. |
onkeyup | Indicates that s key is being released with focus on the element. |
onmousedown | Indicates the press of a mouse button with focus on the element. |
onmousemove | Indicates that the mouse has moved while over the element. |
onmouseout | Indicates that the mouse has moved away from an element. |
onmouseover | Indicates that the mouse has moved over an element. |
onmouseup | Indicates the release of a mouse button with focus on the element. |
Examples
<map name="primary"> <area shape="circle" coords="200,250,25" href="another.htm"> <area shape = "default" nohref> </map>