: The HTML Element
Last updated: 2026-09-12
<html>The HTML Element
The root element of an HTML document; all other elements live inside it. Use lang to declare the page language.
| Category | Document Structure |
|---|---|
| Content Model | Root element (no parent) |
| Allowed Parents | Any element that accepts flow content |
| Content Tag | Yes — requires closing </html> tag |
| Status | Standard |
📝 Syntax
<html lang="en">
<head>...</head>
<body>...</body>
</html>
⚙️ Attributes
This element supports the global attributes plus the following:
| Attribute | Value | Description |
|---|---|---|
lang | Primary language of the document, helps SEO and accessibility. |
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| <html> | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported in all major browsers | |||||
Tip: html is the outermost element; set lang for SEO and screen readers.
🏷️ Related Tags
💡 Related Cases
More case studies coming soon — check back later.