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

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <hr> Tag

HTML <hr>-Tag definiert HTML5Themauntrenner zwischen den Absätzen, sowie HTML 4.01Die horizontale Linie. Dieser Tag wird auch als <hr>-Element bezeichnet.

Online-Beispiel

Verwenden Sie den <hr>-Tag, um Themenänderungen im Inhalt zu trennen:

!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 Verwendung des <hr>-Tags (Grundtutorialsnetz oldtoolbag.com)</title>
</head>
<body>
<body>
<h1>Überschrift 1</h1>
<p>This is the first paragraph.</p>
<hr>
<p>This is the second paragraph.</p>
</body>
</html>
Testen Sie, ob ‹/›

Browserkompatibilität

IEFirefoxOperaChromeSafari

Alle gängigen Browser unterstützen den <hr>-Tag.

Definition und Verwendung der Tags

Der <hr>-Tag definiert eine Themenänderung auf einer HTML-Seite (z.B. den Wechsel eines Themas) und wird als horizontale Linie angezeigt.

Das <hr>-Element wird verwendet, um Inhalte auf HTML-Seiten zu trennen (oder eine Veränderung zu definieren).

Der <hr>-Markierung ist HTML zuzuordnen.5Themauntrennungen zwischen den Absätzen.

HTML 4.01 and HTML5Differences between

In HTML5 In HTML, <hr> defines a thematic change within the content and is displayed as a horizontal line.

In HTML 4.01 In HTML, the <hr> tag is displayed as a horizontal line only.

In HTML 4.01 All layout attributes are discontinued. In HTML5 No longer supports these attributes. Use CSS to define styles for the <hr> element.

Differences between HTML and XHTML

In HTML, the <hr> tag does not have a closing tag.

In XHTML, the <hr> tag must be closed correctly, for example <hr /.

Attribute

AttributeValueDescription
alignleft
center
 right
HTML5 Not Supported. HTML 4.01 Discontinued.    Specify the alignment of the <hr> element
noshadenoshadeHTML5 Not Supported. HTML 4.01 Discontinued.    Specify the color presentation of the <hr> element as a solid color.
sizepixelsHTML5 Not Supported. HTML 4.01 Discontinued.    Specify the height of the <hr> element.
widthpixels
 %
HTML5 Not Supported. HTML 4.01 Discontinued.    Specify the width of the <hr> element.

Global Attributes

Support for <hr> Tag Global Attributes of HTML.

Event Attributes

Support for <hr> Tag HTML Event Attributes.