grid-template-areas
Widely availableSince 201797% of users
Allows you to design a grid layout using 'named areas'. You can draw a visual map of your page using strings, making complex layouts much easier to read.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyClassic, with newer partsIt has worked everywhere since October 2017, and it keeps getting newer values.
Newer parts of grid-template-areas
noneBaseline Jan 2020, Widely Jul 2022
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
none- Inherited
- No
- Applies to
- grid containers
- Animation type
- discrete
Quick example
.container {
display: grid;
grid-template-areas:
"header header"
"sidebar main"
"footer footer";
}
header { grid-area: header; }
main { grid-area: main; }
sidebar { grid-area: sidebar; }
footer { grid-area: footer; }Values
nonegrid-template-areas browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2017.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
57+
52+
10.1+
16+Mobile
57+Android
52+Android
10.3+iOS