Lesson 8 of 18

☷ CSS Grid

🎯 Grades 9–12 ⏱ ~40 minutes 🟡 Intermediate

What You'll Learn

  • How CSS Grid creates two-dimensional layouts with rows and columns
  • grid-template-columns, grid-template-rows, gap, and the fr unit
  • Spanning cells and placing items in named grid areas
Quick Check

1. What does the fr unit represent?

APixels
BA fraction of available space
CFixed rem units

2. Which property defines grid column widths?

Aflex-direction
Bgrid-template-columns
Cgrid-gap

3. Flexbox is best for…

AFull page two-dimensional layouts
BOne-dimensional component layouts
CAnimating elements

4. What does repeat(3, 1fr) create?

AOne column 3fr wide
BThree equal columns
CThree rows