Wrap two paragraphs in a classed div.
Acceptance criteria
- 1.Wrap two paragraphs in a classed div.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <div> 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: “The tag defines a division or section in an HTML document. It is a block-level container used to group content for styling (CSS) or scripting (JavaScript).” .
1.Group for stylingexercise · easy · 10 min
Wrap two paragraphs in a classed div.
Passes when: Wrap two paragraphs in a classed div.
2.A layout rowexercise · easy · 10 min · practice plan
Add a div that will hold columns.
Passes when: Add a div that will hold columns.
3.Use a semantic element insteadexercise · easy · 10 min · practice plan
A page region is a section, not a div.
Passes when: A page region is a section, not a div.
4.A div inside a sectionexercise · easy · 10 min · practice plan
Use a div only for the inner styling wrapper.
Passes when: Use a div only for the inner styling wrapper.
5.A card layoutexercise · medium · 10 min · practice plan
Build a section holding a classed div of two cards.
Passes when: Build a section holding a classed div of two cards.
6.Fix the paragraphs with no wrapperbug fix · easy · 8 min
They need a container to style together.
Passes when: They need a container to style together.
7.Fix the missing second columnbug fix · easy · 8 min · practice plan
The row holds only one column.
Passes when: The row holds only one column.
8.Fix the div used for a page regionbug fix · easy · 8 min · practice plan
A themed region with a heading is a section.
Passes when: A themed region with a heading is a section.
9.Fix the styling wrapper outside its sectionbug fix · easy · 8 min · practice plan
The inner grid belongs inside the region.
Passes when: The inner grid belongs inside the region.
10.Fix the section built entirely from divsbug fix · easy · 8 min · practice plan
Only the layout wrapper should be a div.
Passes when: Only the layout wrapper should be a div.
Between them these tasks cover Generic containers, When to use a div and Semantics first.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.