Columns split content into a side-by-side grid. Use it to place related blocks, such as a code sample and its explanation, next to each other.
Basic syntax
Markdown
:::columns
:::column
Left column content.
:::
:::column
Right column content.
:::
:::/columns
Result
Left column content.
Right column content.
→ Two columns of equal width appear side by side.
Column count
Set the number of columns with cols. The value must be a quoted string and ranges from 1 to 4. The default is 2.
Markdown
:::columns(cols="3")
:::column
One
:::
:::column
Two
:::
:::column
Three
:::
:::/columns
Result
One
Two
Three
→ Three columns of equal width appear side by side.
Rich content
Each :::column accepts any Markdown, including headings, lists, code blocks, and other block extensions.
Markdown
:::columns
:::column
## Option A
- Fast setup
- Fewer dependencies
:::
:::column
## Option B
- More flexible
- Steeper learning curve
:::
:::/columns
Result
→ Each column renders its Markdown content independently, including the heading and list inside it.
Options
| Option | Syntax | Default | Description |
|---|---|---|---|
cols |
cols="N" |
"2" |
Number of columns. Range: 1-4. |
Edge cases
- The
colsvalue is clamped to the 1-4 range. Values outside that range fall back to the default of 2. - The value must be quoted (
cols="3"). An unquoted value (cols=3) is not recognized and the default is used instead. - On small screens, columns stack vertically.
- A bare
:::closes the nearest open block, whether that is a:::columnor the outer:::columnscontainer.:::/columnscloses the container explicitly, including a column left open.