0
0
CSSmarkup~5 mins

Grid gap in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the grid-gap property do in CSS Grid?
It adds space between rows and columns inside a CSS Grid container, creating gaps between grid items.
Click to reveal answer
beginner
How do you set different gaps for rows and columns in CSS Grid?
Use grid-gap with two values: the first for row gap, the second for column gap. For example, grid-gap: 10px 20px; means 10px row gap and 20px column gap.
Click to reveal answer
intermediate
What is the modern property that replaced grid-gap?
The gap property is the modern standard that works for CSS Grid and Flexbox. It replaces grid-gap.
Click to reveal answer
beginner
Can grid-gap accept length units other than pixels?
Yes, it accepts any CSS length units like rem, em, %, or vh to control the gap size responsively.
Click to reveal answer
beginner
Does grid-gap add space inside grid items or between them?
grid-gap adds space only between grid items, not inside them. It separates the items visually without changing their size.
Click to reveal answer
What does grid-gap: 15px 30px; do?
ASets 15px gap for both rows and columns
BSets 15px gap between rows and 30px gap between columns
CSets 30px gap between rows and 15px gap between columns
DSets 30px gap for both rows and columns
Which property is the modern replacement for grid-gap?
Agap
Bgrid-spacing
Cgrid-margin
Dspace-between
If you want equal space between all grid items, which is correct?
Agrid-gap: 20px 10px;
Bgrid-gap: 10px 20px;
Cgrid-gap: 20px;
Dgrid-gap: 0;
Does grid-gap add space inside each grid item?
ANo, it removes space between items
BYes, it adds padding inside items
CYes, it adds margin inside items
DNo, it adds space only between items
Which units can you use with grid-gap?
Apx, rem, em, %, vh
BOnly px
COnly % and px
DOnly em and rem
Explain how to create space between rows and columns in a CSS Grid layout.
Think about how you separate items visually in a grid.
You got /3 concepts.
    Describe the difference between grid-gap and padding inside grid items.
    Consider where the space appears relative to the grid items.
    You got /3 concepts.