CSS Flexbox vs Grid Quiz

Create an account and save your quiz results

Login and save your results

OR

Question 1/15

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

Select your answer

Question 2/15

How do you make a flex item occupy more space than others in the same row?

Select your answer

Question 3/15

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

Select your answer

Question 4/15

Which CSS property is used to create a flex container?

Select your answer

Question 5/15

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

Select your answer

Question 6/15

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

Select your answer

Question 7/15

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

Select your answer

Question 8/15

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

Select your answer

Question 9/15

Which unit is typically used in CSS Grid for flexible lengths?

Select your answer

Question 10/15

To create an equally-spaced grid layout with 2 rows and 3 columns, which grid property is essential?

Select your answer

Question 11/15

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

Select your answer

Question 12/15

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

Select your answer

Question 13/15

If a flexbox container has
flex-flow: row wrap;
, what does this mean?

Select your answer

Question 14/15

Which flexbox property centers items along the main axis?

Select your answer

Question 15/15

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

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 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 2/15
😊 Your answer was correct 🙁 Your answer was incorrect
How do you make a flex item occupy more space than others in the same row?

Available answers

The
flex-grow
property is used to specify how much a flex item will grow relative to the rest of the flex items in the same container.
Question 3/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 4/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which CSS property is used to create a flex container?

Available answers

The property
display: flex;
is used to define a flex container, enabling the use of all the flex properties on its children.
Question 5/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
.
Question 6/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 7/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 8/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 9/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which unit is typically used in CSS Grid for flexible lengths?

Available answers

The
fr
unit represents a fraction of the available space in a grid container, making it excellent for flexible layout design.
Question 10/15
😊 Your answer was correct 🙁 Your answer was incorrect
To create an equally-spaced grid layout with 2 rows and 3 columns, which grid property is essential?

Available answers

To define a layout with 2 rows and 3 columns of equal size, use
grid-template-rows
and
grid-template-columns
with fractional units like
grid-template-rows: repeat(2, 1fr); grid-template-columns: repeat(3, 1fr);
.
Question 11/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 12/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 13/15
😊 Your answer was correct 🙁 Your answer was incorrect
If a flexbox container has <pre><code>flex-flow: row wrap;</code></pre>, what does this mean?

Available answers

flex-flow: row wrap;
means items are laid out in a row and can wrap onto new lines if needed.
Question 14/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which flexbox property centers items along the main axis?

Available answers

The
justify-content
property is used to align flex items along the main axis.
Question 15/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.