grid-template-areas

The CSS Grid property that names regions of the grid with a visual text map, such as "header header" "sidebar main", so items can be placed by name.

In more detail

Each string is a row and each word a cell; a full stop marks an empty cell. Items then use grid-area: main instead of fragile line numbers, and rearranging the map at a breakpoint rearranges the layout.

Example

grid-template-areas: "header header" "sidebar main" ". footer";

Related terms

Taught in

References