CSS columns Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Layout & Columns

What You’ll Learn

The columns shorthand sets column width and column count together — the fastest way to start a multi-column layout.

01

Shorthand

Width + count.

02

Multi-Column

Flowing text layout.

03

auto auto

Default value.

04

One or Two

Flexible values.

05

Responsive

Adapts to space.

06

Readability

Magazine-style text.

Definition and Usage

The columns CSS property is a shorthand that sets the number and width of columns for an element. It combines column-width and column-count into one declaration, making it easy to create multi-column layouts that enhance readability and aesthetics.

Use it on block containers with flowing text content — articles, news sections, or long-form prose. Pair with column-gap, column-rule, and column-span for spacing, dividers, and full-width headings.

💡
Beginner Tip

columns: 200px 3 means each column should be about 200px wide, with a maximum of 3 columns. On narrow screens you may get fewer columns automatically.

📝 Syntax

The syntax for columns combines column width and column count:

syntax.css
selector {
  columns: column-width column-count;
}

Basic Example

columns-200px-3.css
.multicolumn {
  columns: 200px 3;
}
columns: 200px 3; columns: 3; columns: 250px; columns: auto;

Syntax Rules

  • The initial value is equivalent to auto auto.
  • First value (length) sets column-width; second (integer) sets column-count.
  • A single integer sets count only: columns: 3;.
  • A single length sets width only: columns: 200px;.
  • Does not include gap, rule, or span — set those with separate properties.

⚡ Quick Reference

QuestionAnswer
Initial valueauto auto
Shorthand forcolumn-width and column-count
InheritedNo
AnimatableNo
Common usecolumns: 200px 3; for readable article layouts

💎 Property Values

The columns shorthand accepts width and count values from its longhand properties.

ValueDescription
column-widthSpecifies the ideal width of each column. Can be any valid length value (e.g., px, em, rem, etc.).
column-countSpecifies the number of columns. Must be a positive integer.

Longhand Equivalents

ShorthandLonghand equivalent
columns: 200px 3;column-width: 200px; column-count: 3;
columns: 3;column-count: 3;
columns: 250px;column-width: 250px;
columns: auto;column-width: auto; column-count: auto;

👀 Live Preview

A text block using columns: 200px 3 — up to three columns, each about 200px wide.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem, ac viverra ante luctus vel.

Ut sit amet massa bibendum, scelerisque velit eu, sodales libero. Maecenas semper lacus nec ligula tincidunt, vitae iaculis nisi faucibus.

Integer convallis libero et ligula ultricies, a bibendum lacus posuere. Vivamus ullamcorper vehicula massa, a efficitur turpis tincidunt vel.

Examples Gallery

Try width + count, count-only, width-only, and a full magazine-style layout with gap and rule.

📐 Shorthand Basics

Start with the reference example — three columns at 200px width using the columns shorthand.

Example 1 — Width and Count Together

Create a three-column layout with each column about 200 pixels wide.

columns-200px-3.html
<style>
  .multicolumn {
    columns: 200px 3;
  }
</style>

<div class="multicolumn">
  <p>...</p>
</div>
Try It Yourself

How It Works

columns: 200px 3 sets a 200px target width with a maximum of three columns — the browser balances both on available space.

Example 2 — Column Count Only

Use a single integer to fix the number of columns with columns: 2;.

columns-count-only.css
.two-columns {
  columns: 2;
  column-gap: 2rem;
}
Try It Yourself

How It Works

When you pass only an integer, the shorthand sets column-count and leaves width as auto.

🛠 Responsive & Styled Layouts

Use width-only shorthand or combine columns with gap and rule properties.

Example 3 — Column Width Only

Set only the target width — the browser decides how many columns fit.

columns-width-only.css
.auto-flow {
  columns: 18rem;
  column-gap: 1.5rem;
}
Try It Yourself

How It Works

A single length value sets column-width only — ideal for responsive layouts without a fixed column count.

Example 4 — Magazine-Style Layout

Combine columns with gap, rule, and a spanning heading.

columns-magazine.css
.magazine {
  columns: 220px 3;
  column-gap: 2rem;
  column-rule: 1px solid #e2e8f0;
}

.magazine h2 {
  column-span: all;
  margin-bottom: 1rem;
}
Try It Yourself

How It Works

The shorthand handles width and count; companion properties add spacing, dividers, and full-width titles.

🧠 How columns Works

1

Content container

A block element holds paragraphs or other flow content.

Prerequisite
2

You set columns

Write width and count together, e.g. columns: 200px 3.

CSS rule
3

Browser creates columns

Text flows into the calculated number of columns at the target width.

Rendering
=

Multi-column layout

Readable, magazine-style text columns with one concise declaration.

Modern Browser Support

The columns property is widely supported in modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.

Baseline · Modern browsers

Columns shorthand everywhere

All major browsers support the columns shorthand as part of the Multi-column Layout module.

97% Modern browser support
Google Chrome 50+ · Desktop & Mobile
Full support
Mozilla Firefox 52+ · Desktop & Mobile
Full support
Apple Safari 9+ · macOS & iOS
Full support
Microsoft Edge 12+ · All versions
Full support
Opera 37+ · Modern versions
Full support
columns property 97% supported

Bottom line: Use the columns shorthand freely for multi-column text. Test combined width + count on different screen sizes.

Conclusion

The columns property is a powerful and convenient way to create multi-column layouts in your web design. By specifying the width and number of columns, you can easily control the flow and appearance of your content.

Experiment with different configurations to find the best layout for your content and enhance the user experience on your website.

💡 Best Practices

✅ Do

  • Use columns: 200px 3 for balanced readable layouts
  • Add column-gap and column-rule for polish
  • Use column-span: all on headings inside column containers
  • Prefer rem or ch units for accessible column widths
  • Test on narrow viewports where columns may collapse

❌ Don’t

  • Expect columns to handle complex grid layouts — use CSS Grid
  • Forget that gap, rule, and span are separate properties
  • Set too many columns on mobile without media queries
  • Confuse CSS columns with Flexbox or Grid columns
  • Use very narrow column widths that hurt readability

Key Takeaways

Knowledge Unlocked

Five things to remember about columns

Use these points when writing multi-column shorthand.

5
Core concepts
02

auto auto

Default value.

Default
🖌 03

Flexible

One or two values.

Syntax
📐 04

200px 3

Common pattern.

Tip
🛸 05

Add gap/rule

Separate props.

Related

❓ Frequently Asked Questions

columns is a shorthand for column-width and column-count. It lets you set the ideal column width, the number of columns, or both in a single declaration.
The initial value is equivalent to auto auto, which means the browser automatically determines column width and count based on content and available space.
You can write column-width then column-count, such as columns: 200px 3. You may also specify only one value — a length sets width, an integer sets count.
column-count sets only the number of columns. columns can set width, count, or both together as a shorthand.
No. columns only covers width and count. Use column-gap, column-rule, and column-span as separate properties for spacing, dividers, and full-width breakouts.

Practice in the Live Editor

Open the HTML editor, set columns: 200px 3 on a text container, and preview the multi-column flow.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful