XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / h1, h2, h3, h4, h5, h6
(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
h1, h2, h3, h4, h5, h6
HTML 4.01 | HTML 5 |
<hn> ... </hn>
Defines a heading briefly describing the content that follows. There are six hierarchical levels, from h1 (most important) to h6 (least important). HTML syntax requires headings to be used in order of importance. Thus, a h2 heading must not precede an h1 heading in a document’s HTML code. This improves accessibility and is also a form of search engine optimization. Information at higher levels is given greater importance.
Notes
In HTML 5, heading hierarchies can repeat within different sections of the same document, providing more flexible heading levels. This is intended to make consistent presentation easier, since sections can appear the same regardless of their position in the document.
Start/end tag
Required/required
Attributes
Core, internationalization, events, global HTML 5 attributes
align="center|left|right"Deprecated. Not in HTML 5. Aligns headings to the left, to the right or in the center.
Example
<h1>Überschrift</h1>
<p>Es war einmal ... </p>
<h2>Abschnittsüberschrift</h2>
<p>und so weiter ... </p>
<p>und so weiter ... </p>
|
Copyright © 2010 O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "HTML & XHTML ─ kurz & gut" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de