Name

area — HTML 4.01 | HTML5

Synopsis

HTML: <area>; XHTML: <area/> or <area />

The area element is used within the map element of a client-side image map to define a specific clickable (“hot”) area.

Start/End Tags

This is an empty element. In HTML, the end tag is forbidden. In XHTML, the element must be closed with a trailing slash as just shown. Developers may include a space character before the slash for backward compatibility with older browsers.

Attributes

Core, Internationalization, Events, Focus, HTML5 Global Attributes

alt="text"

Required. Specifies a short description of the image that is displayed when the image file is not available.

coords="values"

Specifies a list of comma-separated pixel coordinates that define a “hot” area of an image map.

href="URI"

Specifies the location of the document or resource that is accessed by clicking on the defined area.

hreflang="language code"

HTML5 only. Specifies the language of the target document.

media="all|aural|braille|handheld|print|projection|screen|tty|tv"

HTML5 only. Describes the media (e.g., screen, handheld, speech, print, etc.) for which the target document was designed. The default is all.

nohref="nohref"

Not in HTML5. Defines a “mouse-sensitive” area in an image map for which there is no action when the user clicks in the area.

ping="URLs"

HTML5 only. Specifies a list of URLs that have to be contacted when the link is followed, useful for user tracking.

rel="relationships"

HTML5 only. Establishes one or more relationships between the current ...

Get HTML & XHTML Pocket Reference, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.