The XHTML WYSIWYG Editor For Desktop & Web Applications

area

Definition

The area element identifies geometric regions of a client-side image map, and provides a hyperlink for each region.

Example

  1. <p>
  2. <img src="navbar1.gif" usemap="#map1" alt="" />
  3. <map id="map1">
  4. <area href="guide.html" alt="Access Guide" shape="rect" coords="0,0,118,28" />
  5. <area href="search.html" alt="Search" shape="rect" coords="184,0,276,28" />
  6. <area href="shortcut.html" alt="Go" shape="circle" coords="184,200,60" />
  7. </map>
  8. </p>

Attributes

Basic

alt
(Text) Alternate text. This attribute is required.
coords

(Coords) Specifies the position and shape on the screen. The number and order of values depends on the shape being defined. Possible combinations:

  • rect: left-x, top-y, right-x, bottom-y.
  • circle: center-x, center-y, radius.
  • poly: x1, y1, x2, y2, ..., xN, yN. The first and the last x and y coordinate pair should be the same, in order to close the polygon.

Coordinates are relative to the top-left corner of the object. All values are separated by commas.

href
(URI) Specifies the location of a Web resource.
shape

Specifies the shape of a region. Possible values are:

  • default: Specifies the entire region
  • rect: Defines a rectangular region.
  • circle: Defines a circular region.
  • poly: Defines a polygonal region.

Advanced

accesskey
(Character) Accessibility key character.
onblur
(Script) A client-side script event that occurs when an element loses focus either by the pointing device or by tabbing navigation.
onfocus
(Script) A client-side script event that occurs when an element receives focus either by the pointing device or by tabbing navigation.
nohref
When set, this attribute specifies that a region has no associated hyperlink. Possible value is nohref.
tabindex
(Number) Position in tabbing order.

Common core attributes

class
(NameTokens) This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or set of class names. Multiple class names must be separated by white space characters. Class names are typically used to apply CSS formatting rules to an element.
id
(ID) This attribute assigns an ID to an element. This ID must be unique in a document. This ID can be used by client-side scripts (such as JavaScript) to select elements, apply CSS formatting rules, or to build relationships between elements.
title
(Text) This attribute offers advisory information. Some Web browsers will display this information as tooltips. Assistive technologies may make this information available to users as additional information about the element.

Common internationalization attributes

xml:lang
(NameToken) This attribute specifies the base language of an element's attribute values and text content.
dir

This attribute specifies the base direction of text. Possible values:

  • ltr: Left-to-right
  • rtl: Right-to-left

Common event attributes

onclick
(Script) A client-side script event that occurs when a pointing device button is clicked over an element.
ondblclick
(Script) A client-side script event that occurs when a pointing device button is double-clicked over an element.
onmousedown
(Script) A client-side script event that occurs when a pointing device button is pressed down over an element.
onmouseup
(Script) A client-side script event that occurs when a pointing device button is released over an element.
onmouseover
(Script) A client-side script event that occurs when a pointing device is moved onto an element.
onmousemove
(Script) A client-side script event that occurs when a pointing device is moved within an element.
onmouseout
(Script) A client-side script event that occurs when a pointing device is moved away from an element.
onkeypress
(Script) A client-side script event that occurs when a key is pressed down over an element then released.
onkeydown
(Script) A client-side script event that occurs when a key is pressed down over an element.
onkeyup
(Script) A client-side script event that occurs when a key is released over an element.

Common style attribute

style
(Text) This attribute specifies formatting style information for the current element. The content of this attribute is called inline CSS. The style attribute is deprecated (considered outdated), because it fuses together content and formatting.

Contains

  • Nothing

See also