Add an id to a paragraph.
Acceptance criteria
- 1.Add an id to a paragraph.
HTML Tutorial · HTML References
These 10 tasks go with the HTML Global Attributes 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: “Global attributes are special attributes that can be used with any HTML element — regardless of the tag type. They help define common properties like element identity, accessibility, language, styling, and custom data. These attributes make web development more consistent , interactive , and manageable .” .
1.Give an element an idexercise · easy · 10 min
Add an id to a paragraph.
Passes when: Add an id to a paragraph.
2.Add a classexercise · easy · 10 min · practice plan
Give a paragraph the note class.
Passes when: Give a paragraph the note class.
3.Add a tooltipexercise · easy · 10 min · practice plan
Add a title attribute shown on hover.
Passes when: Add a title attribute shown on hover.
4.Store custom dataexercise · easy · 10 min · practice plan
Add a data attribute holding an id.
Passes when: Add a data attribute holding an id.
5.Hide an elementexercise · medium · 10 min · practice plan
Mark an element as hidden.
Passes when: Mark an element as hidden.
6.Fix the duplicate idbug fix · easy · 8 min
An id must be unique on the page.
Passes when: An id must be unique on the page.
7.Fix the class written as an idbug fix · easy · 8 min · practice plan
A reusable style hook is a class.
Passes when: A reusable style hook is a class.
8.Fix the tooltip in the wrong attributebug fix · easy · 8 min · practice plan
Hover text is the title attribute.
Passes when: Hover text is the title attribute.
9.Fix the custom attributebug fix · easy · 8 min · practice plan
Custom data must start with data-.
Passes when: Custom data must start with data-.
10.Fix the element hidden with a stylebug fix · easy · 8 min · practice plan
Use the hidden attribute rather than inline CSS.
Passes when: Use the hidden attribute rather than inline CSS.
Between them these tasks cover id and class, title and data attributes.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.