The <header> tag

<header> marks the introductory content of its nearest sectioning ancestor — usually a logo, heading, and navigation.

Syntax

<header>...</header>

Example

<header>
  <img src="logo.svg" alt="Company name">
  <nav>...</nav>
</header>

Notes

  • header can be used multiple times on a page — once for the whole document, and again inside individual article/section elements.
  • header has no fixed visual behavior by itself — it's semantics, not sticky positioning (see the sticky header snippet for that).

Accessibility

  • header gets an implicit ARIA role of banner when it isn't nested inside article/aside/main/nav/section.

Related tools