<head>: The HEAD Element
Last updated: 2026-10-13
<head>The HEAD Element
The document head holding non-visible metadata: title, charset, styles, script references, etc.
| Category | Document Structure |
|---|---|
| Content Model | Child of the root element |
| Allowed Parents | Any element that accepts flow content |
| Content Tag | Yes — requires closing </head> tag |
| Status | Standard |
📝 Syntax
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| <head> | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported in all major browsers | |||||
Tip: Content in head is not shown in the body; title and meta charset are crucial for SEO and rendering.
❓ FAQ
QWhich elements belong in head?
AThe metadata zone:
<title>, <meta>, <link>, <style>, <script>, <base>, <noscript>, <template>. Visible content like a div is invalid — head's content model only allows metadata elements.QDoes order matter inside head?
AA few rules:
<meta charset> must appear within the first 1024 bytes (first position is safest); <title> is required and best placed early; the viewport meta must come before styles take effect. Everything else is free-form, though critical CSS should come early to reduce render blocking.QCan head be omitted?
AThe parser auto-completes it, but omission scatters key metadata — without head, title drifts into body. The spec requires title to exist. Writing head explicitly is basic hygiene.
🏷️ Related Tags
💡 Related Cases
More case studies coming soon — check back later.