Grid template areas

noun

say it: “GRID TEM-plit AIR-ee-uhz” /ɡrɪd ˈtɛmplɪt ˈɛriəz/

The CSS property that draws a grid's layout with names, one quoted line of text per row, so you can see the page's shape in the code.

What does grid-template-areas do?

grid-template-areas draws the layout with names, row by row, like a little map of the page.

.page {
  display: grid;
  grid-template-areas:
    "header header"
    "menu   main";
}

In a sentence

  • “With grid-template-areas, I wrote 'header header' above 'sidebar main', and the page took that shape.”

Level: Journeyman · More CSS terms at this level

Updated