CSS Flexbox vs Grid Quiz

Create an account and save your quiz results

Login and save your results

OR

Question 1/15

What property will make a grid item automatically fill the empty spaces in a grid container?

Select your answer

Question 2/15

Which syntax defines a grid with three columns, each 100px wide?

Select your answer

Question 3/15

Which of the following is NOT a valid value for
align-items
in flexbox?

Select your answer

Question 4/15

How do you set the default alignment of items along the cross axis in a flex container?

Select your answer

Question 5/15

In flexbox, how do you prevent the items from shrinking when the container is too small?

Select your answer

Question 6/15

Which CSS declaration makes a grid item span multiple columns?

Select your answer

Question 7/15

Which flex property defines the initial main size of a flex item?

Select your answer

Question 8/15

Which property controls the row alignment of items in a Grid Layout?

Select your answer

Question 9/15

If a flex item has
align-self: stretch;
, what will it do?

Select your answer

Question 10/15

Which CSS property is used to define rows and columns in a grid container?

Select your answer

Question 11/15

What CSS property allows you to change the order of flex items?

Select your answer

Question 12/15

What does setting
flex-wrap: wrap;
do in flexbox?

Select your answer

Question 13/15

What property does the CSS Grid use to define spacing between adjacent cells in a grid container?

Select your answer

Question 14/15

Which property is used in grid layout to merge several cells into one?

Select your answer

Question 15/15

Which property is NOT used to control the spaces between rows and columns in a CSS Grid?

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
What property will make a grid item automatically fill the empty spaces in a grid container?

Available answers

grid-auto-flow: dense;
makes grid items fill empty spaces in a grid, thus allowing items to out of order and fill in gaps.
Question 2/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which syntax defines a grid with three columns, each 100px wide?

Available answers

The syntax
grid-template-columns: 100px 100px 100px;
specifies three columns each with a width of 100px.
Question 3/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which of the following is NOT a valid value for <pre><code>align-items</code></pre> in flexbox?

Available answers

space-around
is not a valid value for
align-items
; it is a value for
justify-content
. Valid values for
align-items
include
center
,
baseline
, and
flex-end
.
Question 4/15
😊 Your answer was correct 🙁 Your answer was incorrect
How do you set the default alignment of items along the cross axis in a flex container?

Available answers

The default alignment of items along the cross axis in a flex container is controlled by
align-items
, and centering them would be
align-items: center;
.
Question 5/15
😊 Your answer was correct 🙁 Your answer was incorrect
In flexbox, how do you prevent the items from shrinking when the container is too small?

Available answers

By setting
flex-shrink: 0;
, you prevent flex items from shrinking below their initial size when the container is too small.
Question 6/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which CSS declaration makes a grid item span multiple columns?

Available answers

The
grid-column: span 2;
declaration is used to make a grid item span two columns.
Question 7/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which flex property defines the initial main size of a flex item?

Available answers

The
flex-basis
property defines the initial main size of a flex item, before any space distribution occurs.
Question 8/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which property controls the row alignment of items in a Grid Layout?

Available answers

The
justify-items
property controls the alignment of grid items along the inline (row) axis within their grid area.
Question 9/15
😊 Your answer was correct 🙁 Your answer was incorrect
If a flex item has <pre><code>align-self: stretch;</code></pre>, what will it do?

Available answers

align-self: stretch;
makes a flex item stretch to fill the container along the cross axis.
Question 10/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which CSS property is used to define rows and columns in a grid container?

Available answers

The properties
grid-template-rows
and
grid-template-columns
are used to specify the sizes of rows and columns in a grid layout.
Question 11/15
😊 Your answer was correct 🙁 Your answer was incorrect
What CSS property allows you to change the order of flex items?

Available answers

The
order
property allows you to change the order of flex items within the same container.
Question 12/15
😊 Your answer was correct 🙁 Your answer was incorrect
What does setting <pre><code>flex-wrap: wrap;</code></pre> do in flexbox?

Available answers

Setting
flex-wrap: wrap;
allows flex items to wrap onto multiple lines as needed, rather than fitting into a single line.
Question 13/15
😊 Your answer was correct 🙁 Your answer was incorrect
What property does the CSS Grid use to define spacing between adjacent cells in a grid container?

Available answers

The
gap
property in CSS Grid is used to define the space (spacing) between adjacent tracks, rows, or columns in the grid container.
Question 14/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which property is used in grid layout to merge several cells into one?

Available answers

grid-area
can be used to merge multiple grid cells into a single item by specifying row and column start and end lines.
Question 15/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which property is NOT used to control the spaces between rows and columns in a CSS Grid?

Available answers

padding
applies space inside an element's border, not specifically between rows and columns in a grid. For grids, you'd use
gap
,
row-gap
, or
column-gap
.