Cells can be grouped together into an area using grid-template-areas.
Final Code
<style>.item1{background:LightSkyBlue;}.item2{background:LightSalmon;}.item3{background:PaleTurquoise;}.item4{background:LightPink;}.item5{background:PaleGreen;}.container{font-size:40px;min-height:300px;width:100%;background:LightGray;display:grid;grid-template-columns:1fr1fr1fr;grid-template-rows:1fr1fr1fr;grid-gap:10px;grid-template-areas:/* Only change code below this line */"header header header"". content content""footer footer footer";/* Only change code above this line */}</style><divclass="container"><divclass="item1">1</div><divclass="item2">2</div><divclass="item3">3</div><divclass="item4">4</div><divclass="item5">5</div></div>