MAP and AREA

name = cdata [CI]

This attribute assigns a name to the image map defined by a MAP element.

AREA attribute definitions

shape = default|rect|circle|poly [CI]
This attribute specifies the shape of a region. Possible values:
coords = coordinates [CN]
This attribute specifies the position a shape on the screen. The number and order of values depends on the shape being defined. Possible combinations:
Coordinates are relative to the top, left corner of the object. All values are lengths. All values are separated by commas.
nohref [CI]
When set, this boolean attribute specifies that a region has no associated link.

Attribute to associate an image map with an element

usemap = uri [CT]
This attribute associates an image map with an element. The image map is defined by a MAP element. The value of usemap must match the value of the name attribute of the associated MAP element.

Attributes defined elsewhere

The MAP element specifies a client-side image map that may be associated with one or more elements (IMG, OBJECT, or INPUT). An image map is associated with an element via the element's usemap attribute.

The presence of the usemap attribute for an OBJECT implies that the object being included is an image. Furthermore, when the OBJECT element has an associated client-side image map, user agents may implement user interaction with the OBJECT solely in terms of the client-side image map. This allows user agents (such as an audio browser or robot) to interact with the OBJECT without having to process it; the user agent may even elect not to retrieve (or process) the object. When an OBJECT has an associated image map, authors should not expect that the object will be retrieved or processed by every user agent.

Each MAP element may contain either one of the following:

  1. One or more AREA elements. These elements have no content but specify the geometric regions of the image map and the link associated with each region. Note that when this method is used, the MAP has no rendered content. Therefore, authors must provide alternate text for each AREA with the alt attribute (see below for information on how to specify alternate text).

  2. Block-level content. This content should include A elements that specify the geometric regions of the image map and the link associated with each region. Note that when this method is used, the MAP element content may be rendered by the user agent. Authors should use this method to create more accessible documents.

If two or more defined regions overlap, the region-defining element that appears earliest in the document takes precedence (i.e., responds to user input).

User agents and authors should offer textual alternates to graphical image maps for cases when graphics are not available or the user cannot access them. For example, user agents may use alt text to create textual links in place of a graphical image map. Such links may be activated in a variety of ways (keyboard, voice activation, etc.).

Note. MAP is not backwards compatible with HTML 2.0 user agents.

Client-side image map examples