Define one row with three named areas.
Acceptance criteria
- 1.Define one row with three named areas.
CSS Tutorial · CSS Grid
These 10 tasks go with the Grid Areas 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: “Describe page regions with named areas and understand how the auto-placement algorithm fills a grid. The chapter combines named page regions with repeat(), auto-fill, auto-fit, implicit tracks, dense packing, and the auto-placement algorithm.” .
1.Name a single row of areasexercise · easy · 10 min
Define one row with three named areas.
Passes when: Define one row with three named areas.
2.Define two rows of areasexercise · easy · 10 min · practice plan
Define two rows: header spanning, then two cells.
Passes when: Define two rows: header spanning, then two cells.
3.Assign an item to an areaexercise · easy · 10 min · practice plan
Put every cell in the area named a.
Passes when: Put every cell in the area named a.
4.Flow items denselyexercise · easy · 10 min · practice plan
Set grid-auto-flow to row dense.
Passes when: Set grid-auto-flow to row dense.
5.Combine areas and gapexercise · medium · 10 min · practice plan
Define named areas with a 12px gap.
Passes when: Define named areas with a 12px gap.
6.Fix the unquoted area rowbug fix · easy · 8 min
Each row of areas must be a quoted string.
Passes when: Each row of areas must be a quoted string.
7.Fix the uneven area rowsbug fix · easy · 8 min · practice plan
Every row must declare the same number of columns.
Passes when: Every row must declare the same number of columns.
8.Fix the wrong property for itemsbug fix · easy · 8 min · practice plan
An item is placed with grid-area.
Passes when: An item is placed with grid-area.
9.Fix the dense keywordbug fix · easy · 8 min · practice plan
The value is "row dense", written in that order.
Passes when: The value is "row dense", written in that order.
10.Fix the comma between area rowsbug fix · easy · 8 min · practice plan
Area rows are separated by whitespace, not commas.
Passes when: Area rows are separated by whitespace, not commas.
Between them these tasks cover grid-template-areas, grid-area and Auto placement.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.