<AREA>NN all   IE all   HTML 3.2
<AREA>End Tag: Forbidden
 

A MAP element defines a client-side image map that is ultimately associated with an image or other object that occupies space on the page. The only job of the MAP element is to assign a name and a tag context for one or more AREA element definitions. Each AREA element defines how the page should respond to user interaction with a specific geographical region of the image or other object.

A client-side image map area can act like an A element link in that an area can link to a destination or javascript: pseudo-URL and assign another frame or window as the target for loading a new document. In fact, in the scripting document object model, an AREA element is referenced as a link. It is not uncommon to use client-side area maps in a navigation bar occupying a slender frame of a frameset. This allows an artist to be creative with a menu design, while giving the page author the power to turn any segment of a larger image into a special-purpose link.

 
Example
<MAP NAME="nav">
<AREA COORDS="20,30,120,70" HREF="contents.html" TARGET="display">
</MAP>
 
Object Model Reference
NN [window.]document.links[i]
IE [window.]document.links[i]
[window.]document.all.elementID
ACCESSKEYNN n/a   IE n/a   HTML 4
ACCESSKEY="character"Optional
 

A single character key that follows the link associated with the image hotspot. The browser and operating system determine if the user must press a modifier key (e.g., Ctrl, Alt, or Command) with the access key to activate the link.

 
Example
<AREA COORDS="20,30,120,70" HREF="contents.html" TARGET="display" ACCESSKEY="t">
 
Value
Single character of the document set.
 
Default None.
ALTNN n/a   IE 3   HTML 3.2
ALT="textMessage"Required
 

Nongraphical browsers can use the ALT attribute setting to display a brief description of the meaning of the (invisible) image's hotspots. At one time, it was thought that the ALT message might by default be displayed in the browser's status bar when the area had focus or the cursor rolled over the area. That function is now typically performed by onMouse-Over event handlers and scripts. Keep in mind that recent handheld computers usually have nongraphical browsers (or allow graphics to be turned off for improved performance). Don't ignore the graphically impaired.

 
Example
<AREA COORDS="20,30,120,70" HREF="contents.html" TARGET="display" 
ALT="Table of Contents">
 
Value
Any quoted string of characters.
 
Default None.
 
Object Model Reference
IE [window.]document.all.elementID.alt
COORDSNN all   IE all   HTML 3.2
COORDS="coord1, ... coordN"Optional
 

Although the formal W3C definition for the COORDS attribute of an AREA element states that the attribute is optional, that doesn't mean that you can omit this attribute and expect an AREA to behave as it should. The COORDS attribute lets you define the outline of the area to be associated with a particular link or scripted action. Some third-party authoring tools can assist in determining the coordinate points for a hot area. You can also load the image into a graphics program that displays the cursor position in real time and then transfer those values to the COORDS attribute values.

Coordinate values are entered as a comma-delimited list. If two areas overlap, the area that is defined earlier in the HTML code takes precedence.

 
Example
<AREA COORDS="20,30,120,70" HREF="contents.html" TARGET="display">
 
Value
Each coordinate is a length value, but the number of coordinates and their order depend on the shape specified by the SHAPE attribute, which may optionally be associated with the element. For SHAPE="rect", there are four coordinates (left, top, right, bottom); for SHAPE="circle", there are three coordinates (center-x, center-y, radius); for SHAPE="poly", there are two coordinate values for each point that defines the shape of the polygon (x1, y1, x2, y2, x3, y3,...xN, yN).
 
Default None.
 
Object Model Reference
IE [window.]document.all.elementID.coords
HREFNN all   IE all   HTML 3.2
HREF="URI"Required
 

The URI of the destination of a link associated with the area. In a browser, when the URI is an HTML document, the document is loaded into the current (default) or other window target (as defined by the TARGET attribute). For some other file types, the browser may load the destination content into a plugin or save the destination file on the client machine. Because Navigator (through Version 4) treats AREA elements as A elements, the HREF attribute must be defined in the AREA element for Navigator scripts to access various properties about the URL and for event handlers (such as onMouseOver) to work.

 
Example
<AREA COORDS="20,30,120,70" HREF="contents.html" TARGET="display">
 
Value
Any valid URI, including complete and relative URLs, anchors on the same page (anchor names prefaced with the # symbol), and the javascript: pseudo-URL in scriptable browsers to trigger a script statement rather than navigate to a destination.
 
Default None.
 
Object Model Reference
IE [window.]document.links[i].href
[window.]document.all.elementID.href
NN [window.]document.links[i].href
In both browsers, other link object properties allow for the extraction of components of the URL, such as protocol and hostname. See the Link object in .
NAMENN n/a   IE n/a   HTML 4
NAME="elementIdentifier"Optional
 

This attribute is included in the HTML 4.0 specification for consistency with other elements. Although NAME attributes are used for identifying form elements upon submission and for scripting references, the browsers through Version 4 do not support this attribute. (IE 4 uses the ID attribute to assign a name to an AREA element for scripted references.) This attribute may become active in future browsers.

 
Value
Case-sensitive identifier.
 
Default None.
NOHREFNN all   IE all   HTML 3.2
NOHREFOptional
 

Tells the browser that the area defined by the coordinates has no link associated with it (as does just not including any HREF attribute). When you include this attribute, scriptable browsers no longer treat the element as a link. As implemented in both Navigator and Internet Explorer, when an AREA element lacks an HREF attribute, the element no longer responds to user events. In IE 4, you can turn this attribute on and off from a script by setting the property to true or false.

 
Example
<AREA COORDS="20,30,120,70" NOHREF>
 
Value
The presence of this attribute sets its value to true.
 
Default false
 
Object Model Reference
IE [window.]document.all.elementID.noHref
SHAPENN all   IE all   HTML 3.2
SHAPE="shape"Optional
 

Defines the shape of the client-side area map whose coordinates are specified with the COORDS attribute. The SHAPE attribute tells the browser how many coordinates to expect.

 
Example
<AREA SHAPE="poly" COORDS="20,20,20,70,65,45" HREF="contents.html" 
TARGET="display">
 
Value
Case-insensitive shape constant. Each implementation defines its own set of shape names and equivalents, but there are common denominators across browsers (circle, rect, poly, and polygon).
Shape Name NN IE HTML
circ
- * -
circle
* * *
poly
* * *
polygon
* * -
rect
* * *
rectangle
- * -
 
Default rect
 
Object Model Reference
IE [window.]document.all.elementID.shape
TABINDEXNN n/a   IE 4   HTML 4
TABINDEX=integerOptional
 

A number that indicates the sequence of this element within the tabbing order of all focusable elements in the document. Tabbing order follows a strict set of rules. Elements that have values other than zero assigned to their TABINDEX attributes are first in line when a user starts tabbing in a page. Focus starts with the element with the lowest TABINDEX value and proceeds in order to the highest value, regardless of physical location on the page or in the document. If two elements have the same TABINDEX values, the element that comes earlier in the document receives focus first. Next come all elements that either don't support the TABINDEX attribute or have the value set to zero. These elements receive focus in the order in which they appear in the document. Because an AREA element cannot be disabled, it always receives focus in turn, except for special handling in IE 4. Typically, an AREA element wired as a link can be triggered with a press of the spacebar once the element has focus.

Note that the Macintosh user interface does not provide for giving focus to elements other than text input fields. Image map areas cannot be tabbed to on the Mac version of IE 4.

 
Example
<AREA COORDS="20,30,120,70" HREF="contents.html" TARGET="display" TABINDEX=3>
 
Value
Any integer from 0 through 32767. In IE 4, setting the TABINDEX to -1 causes the element to be skipped in tabbing order altogether.
 
Default None.
 
Object Model Reference
IE [window.]document.all.elementID.tabIndex
TARGETNN all   IE all   HTML 3.2
TARGET="windowOrFrameName"Optional
 

If the destination document is to be loaded into a window or frame other than the current window or frame, you can specify where the destination document should load by assigning a window or frame name to the TARGET attribute. Target frame names must be assigned to frames and windows as identifiers. Assign names to frames via the NAME attribute of the FRAME element; assign names to new windows via the second parameter of the window.open() scripting method. If you omit this attribute, the destination document replaces the document containing the link. This attribute is applicable only when a value is assigned to the HREF attribute of the element.

An AREA element can have only one destination document and one target. If you want a link to change the content of multiple frames, you can use an AREA element's onClick event handler (check for supported browser versions) or a javascript: pseudo-URL to fire a script that loads multiple documents. Set the location.href property of each frame to the desired URL.

 
Example
<AREA COORDS="20,30,120,70" HREF="contents.html" TARGET="display">
<AREA COORDS="140,30,180,70" HREF="index.html" TARGET="_top">
 
Value
Case-sensitive identifier when the frame or window name has been assigned via the target element's NAME attribute. Four reserved target names act as constants:
_blank Browser creates a new window for the destination document.
_parent Destination document replaces the current frame's framesetting document (if one exists; otherwise, it is treated as _self).
_self Destination document replaces the current document in its window or frame.
_top Destination document is to occupy the entire browser window, replacing any and all framesets that may be loaded (also treated as _self if there are no framesets defined in the window).
 
Default _self
 
Object Model Reference
IE [window.]document.links[i].target
[window.]document.all.elementID.target
NN [window.]document.links[i].target
Hosted by uCoz