CSS gridgap Property (original) (raw)

CSS grid-gap Property

Last Updated : 8 Dec, 2025

The grid-gap property sets the size of the gap between rows and columns in a grid layout, allowing you to easily control the spacing between grid items in both horizontal and vertical directions.

It is a shorthand property for the following properties:

**Syntax:

grid-gap: grid-row-gap grid-column-gap;

Property Values:

Different Examples of CSS Grid Gap Property

**Example 1: In this example, we are using the CSS grid-gap property to give a gap between the row and columns.

html `

CSS grid-gap Property