← All Quizzes
What is CSS Grid Layout and how does it differ from Flexbox?
Explanation
CSS Grid Layout is a two-dimensional layout system that handles both rows and columns simultaneously. Unlike Flexbox (one-dimensional), Grid excels at complex page layouts with explicit control over both axes. Grid uses grid-template-columns, grid-template-rows, and grid-template-areas for precise placement. Use Grid for overall page layout and Flexbox for component-level alignment. They are complementary, not competing technologies.