CKTIS / HTML
header — introductory and navigational content
The `header` element groups introductory content or navigational aids for a page or part of it. It can contain a heading, but does not itself create a new section.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<header>…</header>header represents a group of introductory content or navigational aids. It usually contains an h1–h6 heading or hgroup, but neither is required. It can also contain a logo, table of contents, or search form.
It is not sectioning content and does not create a new section. A page can have separate header elements for the page and an article. It is a container for introductory content, not a replacement for an h1–h6 heading element.
It can be used where flow content is allowed, subject to the applicable content restrictions. In particular, header must not be a descendant of address, header, or footer, even indirectly. It accepts global attributes. It must not have any header or footer descendants, including indirect descendants. In HTML syntax, both the opening and closing tags are required.
Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Header example</title>
</head>
<body>
<header>
<h1>Study notes</h1>
<p>Short lessons about HTML.</p>
</header>
<main>
<article>
<header>
<h2>Semantic elements</h2>
<p>By Alex</p>
</header>
<p>Choose elements according to their meaning.</p>
</article>
</main>
</body>
</html>Result
Study notes Short lessons about HTML. Semantic elements By Alex Choose elements according to their meaning.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.