HTML & CSS CSS Grid Quiz

This CSS quiz checks how CSS Grid sizes and places things. You will compute track sizes from fr units and gaps, count lines for grid-column, compare auto-fill with auto-fit, and work with named areas.

Medium 10 questions ~6 minutes Pass at 80%

Choose a mode

Playing as a guest: sign in to keep your XP and streak.

Sample question

Question 1 of 10

The grid is 600px wide. How wide are the two columns?

.grid {
  display: grid;
  width: 600px;
  grid-template-columns: 1fr 2fr;
}
Show the answer

B. 200px and 400px fr shares the free space in proportion: 3 fractions in total, so 1fr = 200px and 2fr = 400px.

What this quiz covers

  • fr units, fixed tracks and gap
  • Placing items with line numbers, span and -1
  • repeat(), minmax(), auto-fill and auto-fit
  • Implicit rows and grid-template-areas
  • Why 1fr can overflow and minmax(0, 1fr) fixes it

Questions people ask

Do I need an account?

No. Anyone can play. Sign in to keep your XP, streak, badges and history.

Can I retake it?

Yes. Your best score is kept, and the questions and answers are shuffled each time.