Layout algorithms

CSS is comprised of several different layout algorithms1, each designed for different types of user interfaces. The default layout algorithm, Flow layout, is designed for digital documents. Table layout is designed for tabular data. Flexbox is designed for distributing items along a single axis.

CSS Grid is the latest and greatest layout algorithm2. It’s incredibly powerful: we can use it to build complex layouts that fluidly adapt based on a number of constraints.

By default, CSS Grid uses a single column3, and will create rows as needed, based on the number of children.