<head>
The <head> HTML element contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets. There can be only one <head> element in an HTML document.
Note: <head> primarily holds information for machine processing, not human-readability. For human-visible information, like top-level headings and listed authors, see the <header> element.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 1 | 12 | 1 | 1 | 18 | 1 | |
| DOM API | ||||||
| The HTMLHeadElement interface contains the descriptive information, or metadata, for a document. This object inherits all of the properties and methods described in the HTMLElement interface. | 1 | 12 | 1 | 1 | 18 | 1 |
Syntax
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Title</title>
<link rel="stylesheet" href="style.css">
</head> Live demo
Visible vs non-visible content
Contrast head-only metadata with content that belongs in the body.
Head authoring checklist
Keep the document head focused on metadata and resource hints.
Use cases
-
Strengthen structure
Use <head> to make the document outline, grouping, or semantics more explicit.
-
Improve meaning
Apply <head> when clearer HTML structure helps users and tools understand the content.
Cautions
- Test <head> in your target browsers and input environments before depending on it as a primary behavior.
Accessibility
- Prefer semantic structure that improves navigation and interpretation for assistive technologies, not just visual organization.