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

HTML-Referenzhandbuch

HTML-Tag-Übersicht

HTML map name Attribut

Der erforderliche name-Attribut gibt den Namen der Bildkarte an und ist mit dem usemap-Attribut des <img> verknüpft, um eine Beziehung zwischen Bild und Karte herzustellen.

 HTML <map> Tag

Online-Beispiel

Bildkarte mit klickbaren Bereichen:

<!DOCTYPE html>
<html>
<head>
<title>HTML: <map> name Attribut - Grundlagen-Tutorial-Website(oldtoolbag.com)</title>
</head>
<body>
<p>Klicken Sie auf die Sonne oder auf einen der Planeten, um sie genauer zu betrachten:</p>
<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 it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the name attribute.

Definition and Usage

The name attribute specifies the name of the image map.

The name attribute is associated with the usemap attribute of <img> and creates a relationship between the image and the map.

HTML 4.01 and HTML5differences between

None.

Syntax

<map name="mapname">

Attribute Value

ValueDescription
mapnameName of the image map.
 HTML <map> Tag