Challenge - 5 Problems
Grid Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ layout
intermediate2:00remaining
What is the number of columns in this grid?
Consider the CSS below. How many columns will the grid container have?
CSS
display: grid; grid-template-columns: repeat(3, 1fr);
Attempts:
2 left
💡 Hint
The repeat function sets how many columns are created.
✗ Incorrect
The property grid-template-columns: repeat(3, 1fr) creates 3 equal columns.
📝 Syntax
intermediate2:00remaining
Which option correctly defines 2 rows with different heights?
You want a grid with two rows: the first row 100px tall and the second row 200px tall. Which CSS is correct?
Attempts:
2 left
💡 Hint
The property name is grid-template-rows and values are space-separated without commas.
✗ Incorrect
The correct syntax is grid-template-rows: 100px 200px; Commas are not used and the property name must be exact.
❓ rendering
advanced2:00remaining
What will be the height of the second row?
Given this CSS, what is the height of the second row in the grid container?
CSS
display: grid; grid-template-rows: 100px auto 50px;
Attempts:
2 left
💡 Hint
The second value in grid-template-rows sets the second row height.
✗ Incorrect
The second row height is set to auto, which means it adjusts to the content height.
❓ selector
advanced2:00remaining
Which CSS selector targets the second column in a grid?
You want to style all items in the second column of a grid container. Which selector will do this?
Attempts:
2 left
💡 Hint
Grid items are placed row-wise. Use a formula to select every item in the second column.
✗ Incorrect
In a grid with 3 columns, items in the second column are every 3rd item starting at index 2: nth-child(3n+2).
❓ accessibility
expert2:00remaining
How to make a grid accessible for screen readers?
Which practice improves accessibility for a grid layout used as a data table?
Attempts:
2 left
💡 Hint
Semantic HTML elements help screen readers understand data tables better than ARIA alone.
✗ Incorrect
Using semantic table elements provides built-in accessibility and keyboard navigation support for data grids.