Chapter 03 • Document Architecture

HTML Document Structure

Every web page in existence is built upon a standardized architectural skeleton. In this chapter, you will master every core component—from the DOCTYPE switch that triggers modern rendering engines to invisible metadata, character sets, viewport scaling, external resource linking, script execution ordering, and full production-ready boilerplates.

10
Core Lessons
🟡
Elementary Level
20+
Interactive Playgrounds
30+
Quiz Questions

Document Anatomy at a Glance

Before diving into individual tags, visualize how every HTML document organizes machine instructions, search engine data, screen reader directives, and visual content into a rigid tree hierarchy:

<!DOCTYPE html> ← Document Type Declaration (Standard Mode Switch) <html lang="en" dir="ltr"> ← Root Element (The Document Container) │ ├── <head> ← Head Section (Invisible Metadata & Machine Directives) │ ├── <meta charset="UTF-8"> ← Character Encoding (UTF-8 standard) │ ├── <meta name="viewport"> ← Viewport Configuration (Mobile responsiveness) │ ├── <title>Page Title</title> ← Window tab title, bookmark text, search snippet │ ├── <link rel="stylesheet"> ← CSS stylesheets, fonts, preconnections, icons │ └── <script defer></script> ← Deferred JavaScript scripts │ └── <body> ← Body Section (Visible Content Canvas) ├── <header>...</header> ← Page header, navigation, branding ├── <main>...</main> ← Primary unique document content └── <footer>...</footer> ← Footer, copyright, legal links </html>

Chapter 3 Curriculum

Click any lesson below to launch the interactive tutorial, code sandboxes, exercises, and quizzes: