The Page Skeleton · HTML
Ch 1 · Your First Web Page — card 3 of 4.
Every example so far has sat inside the same few lines of boilerplate. They are not decoration: each line tells the browser something important, and almost every real web page starts with them.
- 📄 What <!doctype html> does at the very top
- 🌍 Why the <html> tag carries a lang attribute
- 🏷️ Which tags belong in the <head> and which in the <body>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Maya's Page</title>
</head>
<body>
<h1>Hi, I'm Maya</h1>
<p>Everything you can see lives inside the body.</p>
</body>
</html><!doctype html> tells the browser to use modern HTML rules. <html lang="en"> wraps everything and says the page is in English, which helps screen readers pronounce words properly and helps translation tools. Inside the <head>, <meta charset="utf-8"> lets the page show any character, from é to emoji, and <title> sets the text on the browser tab and in search results. Nothing in the head appears on the page itself.
- The doctype always comes first, before any tag
- <head> holds information about the page; <body> holds what visitors see
- Every page needs a <title>, and each page on a site should have a different one