Challenge - 5 Problems
Grid Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Why use CSS Grid for layout?
Which of the following best explains why CSS Grid is needed for web layouts?
Attempts:
2 left
💡 Hint
Think about how you arrange things on a table with rows and columns.
✗ Incorrect
CSS Grid helps arrange webpage elements in rows and columns, making complex layouts easier to build and maintain.
📝 Syntax
intermediate2:00remaining
Identify the correct CSS Grid syntax
Which CSS code correctly creates a grid container with 3 equal columns?
Attempts:
2 left
💡 Hint
Look for the property that defines columns inside a grid container.
✗ Incorrect
The grid-template-columns property defines the number and size of columns in a grid. Using 1fr 1fr 1fr creates three equal columns.
❓ layout
advanced2:00remaining
What will be the layout result of this CSS Grid code?
Given this CSS, how will the items be arranged visually?
CSS
container {
display: grid;
grid-template-columns: 100px 200px;
grid-template-rows: 50px 50px;
gap: 10px;
}Attempts:
2 left
💡 Hint
Check the sizes defined for columns and rows and the gap between them.
✗ Incorrect
The code defines a grid with two columns (100px and 200px wide) and two rows (each 50px tall). The gap adds space between grid items.
❓ accessibility
advanced2:00remaining
How does CSS Grid improve accessibility?
Which statement best describes how CSS Grid can help make web pages more accessible?
Attempts:
2 left
💡 Hint
Think about how screen readers read content in the order it appears in HTML.
✗ Incorrect
CSS Grid lets developers arrange items visually without changing the HTML order, preserving logical reading order for screen readers and keyboard users.
❓ selector
expert2:00remaining
Which CSS selector targets all direct grid items inside a container?
Given a grid container with class
grid-container, which selector correctly selects only its direct grid items?Attempts:
2 left
💡 Hint
Look for the selector that selects only immediate children.
✗ Incorrect
The > combinator selects only direct children of the container, which are the grid items.