Recall & Review
beginner
What does activating a grid container mean in Tailwind CSS?
Activating a grid container means applying the <code>grid</code> class to an element. This tells the browser to use CSS Grid layout for its children, arranging them in rows and columns.Click to reveal answer
beginner
Which Tailwind CSS class turns an element into a grid container?The <code>grid</code> class activates the grid container behavior on an element.Click to reveal answer
beginner
How do you define the number of columns in a Tailwind grid container?
Use classes like
grid-cols-3 to create 3 equal columns inside the grid container.Click to reveal answer
intermediate
Why is it important to activate the grid container before setting columns or rows?
Without activating the grid container using
grid, classes like grid-cols-3 won't work because the element is not using grid layout.Click to reveal answer
beginner
What visual change happens when you add the <code>grid</code> class to a container with child elements?The child elements arrange themselves into a grid layout, aligning in rows and columns instead of stacking vertically like in normal block layout.
Click to reveal answer
Which Tailwind class activates grid layout on a container?
✗ Incorrect
The
grid class activates the CSS Grid layout on the container.What happens if you use
grid-cols-4 without grid on the container?✗ Incorrect
Without the
grid class, the container does not use grid layout, so grid-cols-4 has no effect.Which class would you use to create 2 columns in a Tailwind grid container?
✗ Incorrect
grid-cols-2 sets the grid container to have 2 columns.What is the default display of a div without any Tailwind layout classes?
✗ Incorrect
By default, a div is a block-level element.
Which Tailwind class would you add to make a container use CSS Grid layout and have 3 columns?
✗ Incorrect
You need to add
grid to activate grid layout and grid-cols-3 to set 3 columns.Explain how to activate a grid container in Tailwind CSS and why it is necessary before setting columns.
Think about what tells the browser to use grid layout.
You got /3 concepts.
Describe the visual difference you see when a container changes from normal block layout to a grid container.
Imagine how boxes line up differently.
You got /3 concepts.