CSS columngap Property (original) (raw)

CSS column-gap Property

Last Updated : 5 Jun, 2026

The column-gap property is used to control the spacing between columns in a multi-column layout.

**Syntax:

column-gap: length | normal | initial | inherit;

**Property Values:

**Example: Shows the usage of CSS column-gap property.

html `

The column-gap Property
<style>
    .gfg {
        -webkit-column-count: 3;
        -moz-column-count: 3;
        column-count: 3;

        -webkit-column-gap: 40px;
        -moz-column-gap: 40px;
        column-gap: 40px;
        /* Specifying Column Gap */
    }

    h1 {
        color: green;
    }

    h1,
    h2 {
        text-align: center;
    }
</style>

GeeksforGeeks

<h1>
    The column-gap Property
</h1>
<p>
    The column-gap property defines the gap
    between the columns of the element:
</p>

<!-- The text inside below div tag is divided in 
    3 columns with a gap of 40px between 
    the columns -->
<div class="gfg">
    The course is designed for students as well as
    working professionals to prepare for coding
    interviews. This course is going to have coding
    questions from school level to the level
    needed for product based companies like Amazon,
    Microsoft, Adobe, etc.
</div>

`