CSS grid-template Property


The grid-template property in CSS is a shorthand property for defining grid columns, rows and areas.The user can set the values for the following longhand properties:

The grid-template property is a shorthand property for the following properties:

  • grid-template-rows
  • grid-template-columns
  • grid-template-areas

CSS Syntax

grid-template: none|grid-template-rows / grid-template-columns|grid-template-areas|initial|inherit;

Supported Browsers:

  • Firefox: 52.0, 2.0 -moz-
  • Google Chrome: 50.0, 4.0 -webkit-
  • Internet Explorer: 10.0
  • Safari: 9.0, 3.1 -webkit-
  • Opera: 37.0, 15.0 -webkit-, 11.1

Example -