<header>: The HEADER Element
Last updated: 2026-10-13
<header>The HEADER Element
Represents introductory content or a navigation area, commonly used at the top of a page or section (site title, logo, main nav).
| Category | Semantic |
|---|---|
| Content Model | Flow content |
| Allowed Parents | Any element that accepts flow content |
| Content Tag | Yes — requires closing </header> tag |
| Status | Standard |
📝 Syntax
<header>header content</header>
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| <header> | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported in all major browsers | |||||
Tip: header describes role/position, not to be confused with head; a page may have multiple headers (e.g. one per article).
❓ FAQ
QCan a page have only one header?
ANo. The page-level header usually appears once at the top of body, but every
<article> or <section> can have its own <header> with that section's title and metadata. Note a header cannot be nested inside another header or a footer.QWhat is the difference between header and h1?
A
<h1> is the heading itself; <header> is an introductory container that may hold a logo, search box, navigation, and heading groups. Putting an h1 inside a header is a common combination, but a header with only a logo and nav is also perfectly valid.QWhat is the difference between header and head?
ATwo entirely different elements:
<head> is the document metadata container (invisible, holds title/meta/link); <header> is the visible page banner. Beginners often confuse them — head is written inside head, header inside body.