Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

css
html
column
communitycreator

What is CSS column-count property?

Behzad Ahmad

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

In CSSCascade Style Sheets, the column-count property specifies the number of columns when defining a multi-column layout.

Syntax


column-count: number|auto|initial|inherit;

Property values

  • number: It specifies the number of columns in which we want to divide our data.

  • auto: This is the default value. It determines the number of columns by using other properties like column-width.

  • initial: This sets the value to its default value.

  • inherit: This is used to inherit property from its parent value.

Code

The following is the basic HTMLHyperText Markup Language and CSS code to demonstrate the use of the column-count property:

Explanation

Here in this example, we have divided the paragraph into two columns. We can also split the section into multiple columns depending upon the need.

RELATED TAGS

css
html
column
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring