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

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <area> coords-Eigenschaft

Die coords-Eigenschaft gibt die x- und y-Koordinaten des Bildkartenbereichs an. Die coords-Eigenschaft wird zusammen mit der shape-Eigenschaft verwendet, um die Größe, Form und Position des Bereichs zu spezifizieren. Hinweis: Die Koordinaten des linken oberen Ecks des Bildkartenbereichs sind 0,0

 HTML <area> Tag

Online-Beispiel

Bildkarten mit klickbaren Bereichen:

<!DOCTYPE html>
<html>
<title>HTML: <area> coords-Eigenschaft - Grundlagen-Tutorial-Website oldtoolbag.com</title>
<body>
<p>Klicken Sie auf die Sonne oder einen der Planeten, um sie aus der Nähe 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" href="sun.html" alt="Sun">
  <area shape="circle" coords="90,58,3" href="mercur.html" alt="Mercury">
  <area shape="circle" coords="124,58,8" href="venus.html" alt="Venus">
  </map>  
</body>
</html>
Testen Sie das Erscheinungsbild ›/›

Browser CompatibilityIEFirefoxOperaChrome

Safari

All major browsers support the coords attribute.

Definition and Usage

The coords attribute specifies the x and y coordinates of the image map area.  shape Use the properties together to specify the size, shape, and position of the area.

Tip: The coordinates of the top left corner of the image area are 0,0.

HTML 4.01 and HTML5The differences between

None.

Syntax

<area coords="value">

Attribute Value

ValueDescription
x1,y1,x2,y2If the shape attribute is set to "rect", this value specifies the coordinates of the top left corner and the bottom right corner of the rectangle.
x,y,radiusIf the shape attribute is set to "circ", this value specifies the coordinates of the center and the radius of the circle.
x1,y1,x2,y2,..,xn,ynIf the shape attribute is set to "poly", this value specifies the coordinates of the vertices of the polygon. If the first coordinate and the last coordinate are not the same, then to close the polygon, the browser must add the last pair of coordinates.

 HTML <area> Tag