HTML Basic Document
Learn the essential structure shared by every HTML document.
Every HTML page uses a small document frame. The doctype selects modern standards mode, html is the root element, head describes the document, and body contains the page people read and operate. Learning this frame removes guesswork from every page you create later.
Understand the five essential parts
A reliable document declares modern HTML, identifies its language, sets a character encoding, configures the mobile viewport, and provides a unique page title. The visible content then belongs in body.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>About Ada — Example Studio</title>
</head>
<body>
<h1>About Ada</h1>
<p>Frontend developer and accessibility advocate.</p>
</body>
</html>- Place the doctype on the first line.
- Set lang to the language of the page.
- Put charset near the start of head.
- Write a concise, page-specific title.
- Keep visible headings and paragraphs in body.
Add useful metadata deliberately
Metadata supports mobile layout, search previews, link sharing, and browser behavior. It should describe the real page, not repeat generic keywords. A description is useful for search snippets, while CSS links and icons connect external resources.