Interactive online courses HTML Academy
2026-03-09 14:07 Diff

The grid-template-areas property allows certain areas to be marked as empty.

The period character . is used for this instead of the alphabetic name of the area.

For example, take the code from a previous topic where we had a grid consisting of three columns.

grid-template-areas: "red yellow green" "red yellow green" "red yellow green";

If we only want the last green cell to remain in the first row, then replace red and yellow on the first line with periods:

grid-template-areas: ". . green" "red yellow green" "red yellow green";

We obtain the desired result:

Let’s add empty areas to the example from the previous assignment.