The browser repairs a misplaced heading
The heading was written in the head, but the browser moved it into the body. The page looks fine; the HTML you wrote isn't the HTML you got.
A proper HTML page has a fixed skeleton: a doctype, an html element with a language, a head with information about the page, and a body with what you see.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 3 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Write the complete skeleton of a page titled Recipes with an <h1> saying My recipes and one paragraph.
Change your page to French: what attribute value do you change?
Explain it without notes
What goes in the <head> and what goes in the <body>?
Why should every page start with <!DOCTYPE html>?
What does lang="en" do, and who benefits from it?
Preview
Console
Nothing logged yet.Expected console output
Heading inside head? false
Heading inside body? true