html · level 1 · unit 2 · lesson 1
- meet it
- guess first
- your turn
- fix it
- nailed it
Tap a green word if you get lost.
meet it
The browser never shows an error. It guesses.
When your HTML has a mistake, the browser does not stop or complain. It makes its best guess and carries on. That sounds kind, but it means a can hide in plain sight.
Forget a closing tag and the browser has to guess where the element ends, often too late. Everything after it can end up inside, so a heading swallows a paragraph.
Misspell a tag, like <hedding>, and the browser does not know it. It ignores the label and shows the words as plain text.
<h1>My garden
<p>The tomatoes are growing.</p> Press show my page to see it here.
The heading never closes here, so the paragraph ends up inside it and looks huge too.
guess first
One tag the browser does not know. What will you see?
Guess before you run it. Wrong guesses are how you learn, and nothing is marked.
<heading>Lost cat</heading>
your turn
Your turn. Close everything you open.
Both elements are missing their closing tags. Type the right closing tag in each blank, then press run.
Press show my page to see it here.
- the heading stops after socknot checked yet
- the paragraph is its own elementnot checked yet
- the paragraph is not inside the headingnot checked yet
fix it
The paragraph has gone huge. Can you fix it?
Press show my page to see it here.
- there is one headingnot checked yet
- the paragraph is not inside the headingnot checked yet
- The paragraph is as big as the heading. Where does the heading end?
- Look at the end of line 1. Is that really a closing tag?
- A closing tag needs a slash. Change the second
<h1>to</h1>, then press run.
nailed it
you can hunt down hidden bugs. :D
- Browsers never show errors. They guess and carry on.
- A missing closing tag can swallow what comes after.
- A misspelt tag shows its words as plain text.
new words in your collection
- bug
This lesson isn’t saved. A free account remembers every lesson you finish.