Challenge - 5 Problems
Grid Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What does
grid class do in Tailwind CSS?In Tailwind CSS, what is the main effect of adding the
grid class to a container element?Attempts:
2 left
💡 Hint
Think about what CSS property the
grid class sets.✗ Incorrect
The grid class in Tailwind sets display: grid; on the element. This activates the CSS Grid layout, allowing you to use grid-specific properties like grid-template-columns and gap.
📝 Syntax
intermediate1:00remaining
Which Tailwind class activates grid layout correctly?
You want to make a container use CSS Grid in Tailwind. Which class should you add?
Attempts:
2 left
💡 Hint
Tailwind uses short, simple class names for display types.
✗ Incorrect
The correct Tailwind class to activate grid layout is grid. Other options are not valid Tailwind classes.
❓ selector
advanced1:30remaining
Which Tailwind class sets a 3-column grid layout?
You have a container with the
grid class. Which class sets exactly 3 equal columns?Attempts:
2 left
💡 Hint
Tailwind uses
grid-cols- prefix for column count.✗ Incorrect
The class grid-cols-3 sets grid-template-columns: repeat(3, minmax(0, 1fr)); which creates 3 equal columns.
❓ rendering
advanced2:00remaining
What will the layout look like with these classes?
Given this HTML:
How will the boxes be arranged visually?
<div class="grid grid-cols-2 gap-4"> <div>Box 1</div> <div>Box 2</div> <div>Box 3</div> </div>
How will the boxes be arranged visually?
Tailwind
<div class="grid grid-cols-2 gap-4"> <div>Box 1</div> <div>Box 2</div> <div>Box 3</div> </div>
Attempts:
2 left
💡 Hint
Think about how 3 items fit into 2 columns.
✗ Incorrect
The grid-cols-2 creates 2 columns. The 3 boxes fill the first row with 2 boxes, and the third box goes to the next row alone.
❓ accessibility
expert2:30remaining
How to make a grid container accessible for screen readers?
You have a grid container with multiple items. Which practice improves accessibility for screen readers?
Attempts:
2 left
💡 Hint
Think about how screen readers understand page structure.
✗ Incorrect
Using semantic elements and descriptive ARIA labels helps screen readers understand the grid's purpose and content. Avoid hiding or removing focus from important content.