Build the frame

Write a complete document with nothing missing.

What to build

A full page whose visible text is one heading.

Requirements

  • Start with the doctype.
  • An html element with lang="en".
  • A head containing <meta charset="utf-8"> and a title with the text My page.
  • A body containing one h1, with any text.

Constraints

The title belongs in the head, and the h1 in the body.

Example

The frame is shown in the Syntax part of the lesson.

Why it works

With a doctype the browser uses modern rules, and a declared charset means your letters arrive intact.

Hints

Hint 1

Begin with the doctype. Then html, with head and body inside it.

Solution

Show one correct solution (try it yourself first)
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>My page</title>
  </head>
  <body>
    <h1>Hello</h1>
  </body>
</html>

Lesson: The skeleton of every page →