The tags in this page overlap. It may look fine, but the browser is guessing.
What to build
The same sentence, correctly nested.
Requirements
- One
pelement holding the whole sentenceLearning HTML is fun. - The word
HTMLinside astrongelement, inside thep. - The word
funinside anemelement, inside thep.
Constraints
Do not add or remove any words.
Example
Elements close in reverse order: <p><em>word</em></p>.
Why it works
Each element must sit completely inside its parent, so the browser builds exactly the tree you meant.
Hints
Hint 1
Find each pair of tags. The tag opened last has to close first.
Hint 2
Check that the closing tags appear in the reverse order of the opening ones.
Solution
Show one correct solution (try it yourself first)
<p>Learning <strong>HTML</strong> is <em>fun</em></p>