Headings
suggest changeIntroduction
HTML provides six heading elements, <h1> through <h6>, for headings of decreasing rank. Browsers usually render <h1> as the largest and <h6> as the smallest, but the rank is semantic, not a font-size choice. Do not confuse these with the <header> element. This topic details proper usage of these elements.
Syntax
<h1>...</h1><h2>...</h2><h3>...</h3><h4>...</h4><h5>...</h5><h6>...</h6>
Remarks
- An
h1–h6element must have both a start tag and an end tag.1 h1–h6elements are block level elements by default (CSS style:display: block).2h1–h6elements should not be confused with the section element- Heading tags (
h1–h6) are not related to theheadtag. - Permitted Content: phrasing content
- The different CSS-styles for headings differ usually in
font-sizeandmargin. The following CSS-settings forh1–h6elements can serve as an orientation (characterized as ‘informative’ by the W3C) - Search-engine crawlers often give more weight to higher-rank headings (
h1, thenh2, thenh3, and so on) when deciding what a page is about. That is not a guarantee, and headings should still describe the content.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents