HTML & CSS · Middle · Question 7 of 75
How do you define a "header on top, sidebar and content in the middle, footer at the bottom" layout in Grid with named areas?
- 1With
grid-area-names: header sidebar main footeron the container - ✓Correct answer: With
grid-template-areason the container andgrid-areaon the children - 3With named
grid-template-columnsandgrid-column: nameon the children
Explanation
grid-template-areas describes the layout as string "pictures": "header header" "sidebar main" "footer footer", and items attach via grid-area: header. A dot . marks an empty cell. It's great for responsiveness: a media query only changes the template. There is no grid-area-names property.