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

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <h2Tag

HTML <h2>Der Marker definiert den zweiten Ebenentitel im HTML-Dokument. Dieser Tag wird auch oft als <h2>Element.

Online-Beispiel

 HTML h2Titel:

!doctype html
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 H2Verwendung von Tags (Grundlagen-Tutorial-Netz3codebox.com)</title>
</head>
<body>
<h1>Überschrift 1</h1>
<p>Dies ist der Inhalt, der unter der Überschrift angezeigt wird 1.</p>
<h2>Überschrift 2</h2>
<p>Dies ist der Inhalt, der unter der Überschrift angezeigt wird 2.</p>
</body>
</html>
Testen Sie, ob ‹/›

Browserkompatibilität

IEFirefoxOperaChromeSafari

Alle gängigen Browser unterstützen <h2> Tag.

Tag Definition and Usage

HTML <h2> elements are within the<body> tag.

The range of headings can be from<h1> to<h6>.1> The least important heading is<h6>.

in<h1After the heading find<h2Headings. Do not skip heading levels.

<h2Font display of headings is usually smaller than<h1Small headings.

Do not just use<h2Tags to apply other formatting.<h2Tags are used to define heading levels, for example in a table of contents.

HTML 4.01 vs HTML5differences

In HTML 4.01 in, <h2> align attribute has been deprecated. In HTML 5 in, <h2The "align" attribute of the element is not supported. Please use CSS to align elements.

Attribute

AttributeValueDescription
alignleft
center
right
justify
HTML5 Not Supported. HTML 4.01 Deprecated. Defines the alignment of the title text.

Global Attributes

<h2Tag Support HTML Global Attributes.

Event Attributes

<h2Tag Support HTML Event Attributes.

Related Articles

HTML Tutorial:HTML Titles