English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <area> Tag

Das HTML <area>-Tag definiert den klickbaren Bereich (oder Hotspot) innerhalb eines Bild-Mappings. Sie können Hyperlinks mit diesem klickbaren Bereich verknüpfen. Dieses Tag muss innerhalb des <map>-Tags stehen. Dieses Tag wird auch als <area>-Element bezeichnet.

Online-Beispiel

Bilder-Mapping mit klickbaren Bereichen:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Grundlagen-Tutorial-Website(oldtoolbag.com)</title> 
</head>
<body>
<img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap">
 
<map name="planetmap">
  <area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.html">
  <area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.html">
  <area shape="circle" coords="124,58,8" alt="Venus" href="venus.html">
</map>
</body>
</html>
Test and see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support the <area> tag.

Tag definition and usage instructions

The <area> tag defines an area within the image map (an image map is an image with clickable areas).

The <area> element is always nested within the <map> tag.

The HTML <area> element is located within the <body> tag and must be within the <map> tag.

Note: <img> The usemap attribute in the tag is associated with <map> elements are associated with the name in the element to create a relationship between the image and the map.

HTML 4.01 with HTML5differences

HTML5 It has provided some new attributes and no longer supports HTML 4.01 Some attributes in

Differences between HTML and XHTML

In HTML, the <area> tag has no closing tag.

In XHTML, the <area> tag must be closed correctly.

Attribute

New: HTML5 new attribute in

AttributeValueDescription
alttextSpecify the alternative text for the region. This attribute is required if the href attribute is used.
coordscoordinatesSpecify the coordinates of the region.
hrefURLSpecify the target URL for the region.
downloadHTML5filenameWhen the user clicks on the hyperlink, the specified target file will be downloaded.
hreflangHTML5language_codeSpecify the language of the target URL.
mediaHTML5media querySpecify the target URL for which medium/Device optimization. Default: all.
nohrefvalueHTML5 Nicht unterstützt. Definiert Bereiche ohne verwandte Links.
relHTML5alternate
author
bookmark
help
license
next
nofollow
noreferrer
prefetch
prev
search
tag
Definiert die Beziehung zwischen dem aktuellen Dokument und der Ziel-URL.
shapedefault
 rect
circle
poly
Definiert die Form des Bereichs.
target_blank
 _parent
 _self
 _top
framename
Definiert, wo die Ziel-URL geöffnet wird.
typeHTML5MIME_typeDefiniert den MIME-Typ der Ziel-URL.
Anmerkung: MIME = Multipurpose Internet Mail Extensions.

Globale Attribute

Der <area> Tag unterstützt HTML Globale Attribute.

Ereignisattribute

Der <area> Tag unterstützt HTML Ereignisattribute.

Verwandte Artikel

HTML DOM Referenzhandbuch: Area-Objekt