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.

<!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.