English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
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 ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the <area> tag.
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.
HTML5 It has provided some new attributes and no longer supports HTML 4.01 Some attributes in
In HTML, the <area> tag has no closing tag.
In XHTML, the <area> tag must be closed correctly.
New: HTML5 new attribute in
Attribute | Value | Description |
---|---|---|
alt | text | Specify the alternative text for the region. This attribute is required if the href attribute is used. |
coords | coordinates | Specify the coordinates of the region. |
href | URL | Specify the target URL for the region. |
downloadHTML5 | filename | When the user clicks on the hyperlink, the specified target file will be downloaded. |
hreflangHTML5 | language_code | Specify the language of the target URL. |
mediaHTML5 | media query | Specify the target URL for which medium/Device optimization. Default: all. |
nohref | value | HTML5 Nicht unterstützt. Definiert Bereiche ohne verwandte Links. |
relHTML5 | alternate author bookmark help license next nofollow noreferrer prefetch prev search tag | Definiert die Beziehung zwischen dem aktuellen Dokument und der Ziel-URL. |
shape | default rect circle poly | Definiert die Form des Bereichs. |
target | _blank _parent _self _top framename | Definiert, wo die Ziel-URL geöffnet wird. |
typeHTML5 | MIME_type | Definiert den MIME-Typ der Ziel-URL. Anmerkung: MIME = Multipurpose Internet Mail Extensions. |
Der <area> Tag unterstützt HTML Globale Attribute.
Der <area> Tag unterstützt HTML Ereignisattribute.
HTML DOM Referenzhandbuch: Area-Objekt