CSS Grid Quiz
Want to learn more than this quiz offers you? Have a look at my Frontend web
development courses.
Create an account and save your quiz results
Login and save your results
OR
Question 1/15
Which property allows you to control the space between rows in a grid without affecting columns?
Select your answer
Question 2/15
What does the CSS rule
grid-template-areas: "a a a" "b b c";
indicate?
Select your answer
Question 3/15
When using
grid-auto-flow: dense;
, what behavior can we expect from the grid container?
Select your answer
Question 4/15
How would you create a gap of 10px between all grid items in a grid container?
Select your answer
Question 5/15
What does the CSS rule
grid-template-rows: repeat(4, 100px);
mean?
Select your answer
Question 6/15
Which property controls the alignment of items along the column axis within a grid?
Select your answer
Question 7/15
Which keyword allows a grid item to fill the remainder of the space despite other items?
Select your answer
Question 8/15
When does
grid-template-areas
become useful in a grid layout?
Select your answer
Question 9/15
How does the
subgrid
value change grid behavior?
Select your answer
Question 10/15
Why might
minmax()
be preferred over strict unit definitions in grid layouts?
Select your answer
Question 11/15
Which CSS rule can define named areas in a grid to simplify template layout?
Select your answer
Question 12/15
What CSS Grid property allows overriding of the grid containerβs alignment along the horizontal axis?
Select your answer
Question 13/15
What unique value can
grid-template-columns
take to accommodate content's intrinsic size?
Select your answer
Question 14/15
What will happen if you set
grid-template-columns: repeat(3, 1fr);
on a grid container?
Select your answer
Question 15/15
Which axis is manipulated by
align-content
in a grid layout?
Select your answer
Your Results
You did not answer any questions correctly.
Your Answers
Question 1/15
π Your
answer was correct
π Your
answer was incorrect
Which property allows you to control the space between rows in a grid without affecting columns?
Available answers
The
row-gap
property specifically controls the spacing between grid rows without influencing the space between columns.
Question 2/15
π Your
answer was correct
π Your
answer was incorrect
What does the CSS rule <pre><code>grid-template-areas: "a a a" "b b c";</code></pre> indicate?
Available answers
The
grid-template-areas
rule defines a grid with two rows: the first row has three columns all with area 'a', and the second row has three columns with two 'b's and one 'c'.
Question 3/15
π Your
answer was correct
π Your
answer was incorrect
When using <pre><code>grid-auto-flow: dense;</code></pre>, what behavior can we expect from the grid container?
Available answers
grid-auto-flow: dense;
ensures the grid tries to fill in the gaps in the layout as much as possible by repositioning items.
Question 4/15
π Your
answer was correct
π Your
answer was incorrect
How would you create a gap of 10px between all grid items in a grid container?
Available answers
The properties
grid-gap
and gap
can be used to set the space between grid items.
Question 5/15
π Your
answer was correct
π Your
answer was incorrect
What does the CSS rule <pre><code>grid-template-rows: repeat(4, 100px);</code></pre> mean?
Available answers
The
grid-template-rows: repeat(4, 100px);
rule creates 4 rows, each 100px in height.
Question 6/15
π Your
answer was correct
π Your
answer was incorrect
Which property controls the alignment of items along the column axis within a grid?
Available answers
The
align-items
property is used to align grid items along the column (block/start) axis.
Question 7/15
π Your
answer was correct
π Your
answer was incorrect
Which keyword allows a grid item to fill the remainder of the space despite other items?
Available answers
The keyword
span
allows a grid item to extend and fill the remainder of the space in the specified direction.
Question 8/15
π Your
answer was correct
π Your
answer was incorrect
When does <pre><code>grid-template-areas</code></pre> become useful in a grid layout?
Available answers
grid-template-areas
is particularly useful when it helps identify and refer to specific areas to manage a layout cleanly.
Question 9/15
π Your
answer was correct
π Your
answer was incorrect
How does the <pre><code>subgrid</code></pre> value change grid behavior?
Available answers
The
subgrid
value allows the grid to inherit tracks (rows or columns) from the parent grid, providing coherent alignment.
Question 10/15
π Your
answer was correct
π Your
answer was incorrect
Why might <pre><code>minmax()</code></pre> be preferred over strict unit definitions in grid layouts?
Available answers
minmax()
is preferred because it allows defining a minimum and maximum size, offering adaptability for responsive designs.
Question 11/15
π Your
answer was correct
π Your
answer was incorrect
Which CSS rule can define named areas in a grid to simplify template layout?
Available answers
The
grid-template-areas
rule allows you to assign names to areas, making layout designs more intuitive and readable.
Question 12/15
π Your
answer was correct
π Your
answer was incorrect
What CSS Grid property allows overriding of the grid containerβs alignment along the horizontal axis?
Available answers
The
justify-items
property allows overriding of the grid containerβs alignment, dictating how items align along their inline axis (horizontally).
Question 13/15
π Your
answer was correct
π Your
answer was incorrect
What unique value can <pre><code>grid-template-columns</code></pre> take to accommodate content's intrinsic size?
Available answers
The
fit-content()
value allows grid-template-columns
to be adjusted based on the content's intrinsic size within given constraints.
Question 14/15
π Your
answer was correct
π Your
answer was incorrect
What will happen if you set <pre><code>grid-template-columns: repeat(3, 1fr);</code></pre> on a grid container?
Available answers
Using
grid-template-columns: repeat(3, 1fr);
creates a grid with 3 columns that take up equal portions of the available space.
Question 15/15
π Your
answer was correct
π Your
answer was incorrect
Which axis is manipulated by <pre><code>align-content</code></pre> in a grid layout?
Available answers
The
align-content
property manipulates the vertical or row axis within the grid layout.