Add an HTML comment, then an h1 saying "Docs".
Acceptance criteria
- 1.Add an HTML comment, then an h1 saying "Docs".
HTML Tutorial · HTML Basics
These 10 tasks go with the HTML Comments chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “Comments in HTML are notes or explanations added to your code for yourself or other developers. They do not appear on the webpage , but are visible in the HTML source code. Comments make your code easier to understand and maintain.” .
1.Add a comment above a headingexercise · easy · 10 min
Add an HTML comment, then an h1 saying "Docs".
Passes when: Add an HTML comment, then an h1 saying "Docs".
2.Comment out an elementexercise · easy · 10 min · practice plan
Keep only the paragraph visible; comment out the old heading.
Passes when: Keep only the paragraph visible; comment out the old heading.
3.Label a section with a commentexercise · easy · 10 min · practice plan
Add a comment and a section containing a heading.
Passes when: Add a comment and a section containing a heading.
4.Comment between two blocksexercise · easy · 10 min · practice plan
Add two paragraphs with a comment between them.
Passes when: Add two paragraphs with a comment between them.
5.Document an attribute choiceexercise · medium · 10 min · practice plan
Add a comment explaining a link that opens in a new tab.
Passes when: Add a comment explaining a link that opens in a new tab.
6.Fix the heading left inside a commentbug fix · easy · 8 min
The page title is commented out, so no heading renders.
Passes when: The page title is commented out, so no heading renders.
7.Fix the legacy conditional commentbug fix · easy · 8 min · practice plan
The content sits inside a conditional comment, so modern browsers never render it.
Passes when: The content sits inside a conditional comment, so modern browsers never render it.
8.Fix the commented-out contentbug fix · easy · 8 min · practice plan
The paragraph that should show was commented out.
Passes when: The paragraph that should show was commented out.
9.Fix the TODO left in place of the headingbug fix · easy · 8 min · practice plan
A comment stands where the real heading should be.
Passes when: A comment stands where the real heading should be.
10.Fix the paragraph commented out with the notebug fix · easy · 8 min · practice plan
The note and the paragraph were commented out together.
Passes when: The note and the paragraph were commented out together.
Between them these tasks cover Comment syntax and Commenting out markup.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.