HTML Structure

All HTML topics
∙ Chapter 02

HTML Structure

Every HTML page has the same basic skeleton. Understanding this is the foundation of everything you'll build.

🏗️The Basic Skeleton — line by line
  • 1<!DOCTYPE html> — Tells the browser "This is HTML5." Always the very first line.
  • 2<html> — The root element. Everything lives inside this tag.
  • 3<head> — Invisible info about the page (title, styles, metadata).
  • 4<title> — The text shown on the browser tab.
  • 5<body> — Everything the user sees: text, images, links, buttons.
Tip: HTML tags come in pairs — an opening <p> and a closing </p>. The closing tag has a forward slash.
structure.php
📝 Edit Code
👁 Live Preview
💡 Try changing the text inside <h1> and clicking Run again!