Add a comment above a heading, and the heading itself.
Acceptance criteria
- 1.Add a comment above a heading, and the heading itself.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML Comment Tag 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: “HTML comments are used to insert notes or explanations in the HTML code that are not displayed in the browser . Comments are helpful for developers to document code , temporarily disable code, or leave reminders.” .
1.Comment a sectionexercise · easy · 10 min
Add a comment above a heading, and the heading itself.
Passes when: Add a comment above a heading, and the heading itself.
2.Comment inside a listexercise · easy · 10 min · practice plan
Add a comment inside a list, plus two items.
Passes when: Add a comment inside a list, plus two items.
3.Note a to-doexercise · easy · 10 min · practice plan
Leave a to-do comment beside the content it refers to.
Passes when: Leave a to-do comment beside the content it refers to.
4.Comment a closing tagexercise · easy · 10 min · practice plan
Add a closing comment after a section.
Passes when: Add a closing comment after a section.
5.A commented layoutexercise · medium · 10 min · practice plan
Comment each of the two regions you add.
Passes when: Comment each of the two regions you add.
6.Fix the note used as the headingbug fix · easy · 8 min
The developer note replaced the real title.
Passes when: The developer note replaced the real title.
7.Fix the missing second itembug fix · easy · 8 min · practice plan
The list is commented but incomplete.
Passes when: The list is commented but incomplete.
8.Fix the to-do shown instead of the copybug fix · easy · 8 min · practice plan
The note was left where the text should be.
Passes when: The note was left where the text should be.
9.Fix the missing sectionbug fix · easy · 8 min · practice plan
The closing comment has nothing to close.
Passes when: The closing comment has nothing to close.
10.Fix the region left unbuiltbug fix · easy · 8 min · practice plan
The comment says main, but there is no main.
Passes when: The comment says main, but there is no main.
Between them these tasks cover Comments, Notes for developers and What not to comment.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.