grid-template-areas
Allows defining layouts using semantic names for different grid zones.
- The container uses grid-template-areas.
- Each item is assigned with grid-area: name.
Example
With grid-template-areas we define a layout of 3 rows and 3 columns where each cell has a semantic name, and each item is placed with grid-area. Change the arrangement: the HTML stays the same, only the template changes.
ResultLive
html
css