Lesson 2 / 28
Document Structure
The doctype, html, head and body skeleton every page starts with.
The basic skeleton
Every HTML document follows this shape — memorize it, you'll type it constantly.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Page</title>
</head>
<body>
<h1>Hello!</h1>
</body>
</html>What each part does
<!DOCTYPE html> tells the browser to use modern HTML5 rules. <html> wraps the whole page. <head> holds metadata (not shown on-screen); <body> holds visible content.
Quick check: Which element holds the content visitors actually see?
- <head>
- <body>
- <!DOCTYPE html>
Answer
<body> — `<body>` contains everything rendered on the page; `<head>` is metadata for the browser.