area Element


 

Module

The area element is declared by the XHTML 1.1 Client-side Image Map Module

Elements in the Client-side Image Map Module are:
map | area

Description

The area element is used to associate a target URI with a specific area in an image map created using the Client-side Image Map Module. See the map element for details on how to set up such an image map.

For example, to create an area defined by a circle with radius 15px and centre at pixel coordinate (30,20) from the top left of the image:

<area shape="circle" coords="30,20,15" href="examples.html" alt="Examples" />

See the Coords Attribute Type for more details of how to specify areas with different shapes.

As an alternative to area, the shape and coords attributes may instead be used on the a element within a map.

Note: The area element does not have an hreflang attribute declared so any client-side image maps which require this functionality should use a elements instead.

#REQUIRED Attributes

The alt attribute is #REQUIRED on the area element.


Specific Attributes

Specific attributes of the area element are listed below:

From the Client-side Image Map Module - the Element's own Module

accesskey [ type Character ]
Key to allow keyboard activation of the hyperlink
alt [ type Text - #REQUIRED ]
Alternative text for area (to be used by non-graphical browsers)
coords [ type Coords ]
This specifies the coordinates applying to the shape of the area
href [ type URI ]
The destination URI of the hyperlink
nohref [ type Boolean ]
If this attribute is specified, it states that the area has no associated hyperlink
shape [ type Shape (rect | circle | poly | default) - default="rect" ]
This specifies the shape of the region which applies to the area - the coords attribute specifies the shape's dimensions
tabindex [ type Number ]
An integer between 0 and 32767 specifying the position of the area in the tabbing order of the document

From the Intrinsic Events Module

onblur [ type Script ]
Script to be executed when the element loses focus, for example when tabbed away from
onfocus [ type Script ]
Script to be executed when the element receives focus, for example either when tabbed to via the keyboard or when the link is clicked using a mouse

From the Target Module

target [ type FrameTarget ]
Indicates the window or frame in which to open the link

Common Attributes

Common attributes of the area element are listed below:

From the Core Attribute Collection

class [ type NMTOKENS ]
One or more space separated classes
id [ type ID ]
A unique identifier for the element
style [ type CDATA ], from the Style Attribute Module (deprecated)
Element-specific styles
title [ type Text ]
Descriptive title for the element (in some user agents this may appear as a "tooltip" when the mouse hovers over the element)
xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]
XML namespace

From the I18N Attribute Collection

dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Module
Left-to-right or right-to-left directionality
xml:lang [ type LanguageCode ]
A language code for the element

From the Events Attribute Collection

All attributes in the Events Attribute Collection are supported:
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup


Content Model

The Content Model for the area element is:

EMPTY

See Content Model & Nesting for information about Content Model syntax and Nesting Groups.

Valid children of area

This element is empty and may have no children.

Valid parents of area


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 01 Oct 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Element Index (XHTML 1.1) > area Element