CSS · Properties — CSS Grid Layout

grid-template

The CSS grid-template property. Initial value: grid-template-columns,grid-template-rows,grid-template-areas. Not inherited.

Syntax
grid-template: none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?

Example

Try it

Notes

Media: visual. Applies to: gridContainers. Computed value: grid-template-columns,grid-template-rows,grid-template-areas.

More in this group

grid-area grid-auto-columns grid-auto-flow grid-auto-rows grid-column-end grid-column-start grid-row-end grid-row-start

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course