Skip to content

Courses / CSS3 Mastery: Beginner to Advanced / CSS Grid Fundamentals

2,092 people viewed this

CSS Grid Fundamentals

Create a responsive gallery with at least six cards. Use repeat(), minmax(), auto-fit, gap and a featured item spanning two columns.

Quiz — 10 MCQs

  1. Which declaration enables Grid? (A) display: grid (B) layout: grid (C) position: grid (D) float: grid. Answer: A. Display grid creates a grid container.
  2. What does fr represent? (A) A fraction of available grid space (B) A font family (C) A fixed pixel unit (D) A border style. Answer: A. Fr distributes space under the grid track sizing algorithm.
  3. What does gap control? (A) Space between tracks (B) Font size (C) Selector priority (D) Position type. Answer: A. Gap defines gutters between rows and columns.
  4. What does repeat() do? (A) Repeats track definitions (B) Repeats JavaScript (C) Repeats an animation only (D) Duplicates HTML elements. Answer: A. Repeat reduces repetitive grid track declarations.
  5. What does minmax() define? (A) Minimum and maximum track sizing bounds (B) Text color (C) Font weight (D) Link behavior. Answer: A. It specifies a sizing range for tracks.
  6. What does grid-column: 1 / 3 specify? (A) Start at line 1 and end at line 3 (B) Three columns always (C) One pixel width (D) Three grid containers. Answer: A. It defines the start and end grid lines.
  7. What is an implicit track? (A) A track created as needed beyond the explicit grid (B) A CSS comment (C) A font fallback (D) A hidden element. Answer: A. Implicit tracks are generated when placement requires them.
  8. What does auto-fit do in repeated grid tracks? (A) Collapses empty repeated tracks where appropriate (B) Always creates exactly one column (C) Removes all content (D) Changes font size. Answer: A. Auto-fit collapses empty repeated tracks under applicable sizing conditions.
  9. Which property controls implicit row sizes? (A) grid-auto-rows (B) grid-row-color (C) font-size (D) outline. Answer: A. Grid-auto-rows sizes implicit rows.
  10. Can Grid place an item across multiple columns? (A) Yes (B) No (C) Only with floats (D) Only through JavaScript. Answer: A. Grid items can span multiple tracks.

Key Takeaways

  • Grid organizes content across rows and columns.
  • Use fr, repeat(), minmax() and gap for flexible layouts.
  • Understand explicit tracks, implicit tracks and grid-line placement.

Rate this course

No ratings yet — yours can be the first.

Stars show on this course. Your written note stays private.

Your stars