HTML Comments — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the HTML Comments lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Exercises(5)
- 1
Add a comment above a heading
easy10 minAdd an HTML comment, then an h1 saying "Docs".
- 2
Comment out an element
easy10 minKeep only the paragraph visible; comment out the old heading.
- 3
Label a section with a comment
easy10 minAdd a comment and a section containing a heading.
- 4
Comment between two blocks
easy10 minAdd two paragraphs with a comment between them.
- 5
Document an attribute choice
medium10 minAdd a comment explaining a link that opens in a new tab.
Find the bug(5)
- 1
Fix the heading left inside a comment
easy8 minThe page title is commented out, so no heading renders.
- 2
Fix the legacy conditional comment
easy8 minThe content sits inside a conditional comment, so modern browsers never render it.
- 3
Fix the commented-out content
easy8 minThe paragraph that should show was commented out.
- 4
Fix the TODO left in place of the heading
easy8 minA comment stands where the real heading should be.
- 5
Fix the paragraph commented out with the note
easy8 minThe note and the paragraph were commented out together.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace