The column-count property is used to divide the content of an HTML element into multiple columns, creating a newspaper-style layout.
- Specifies the number of columns into which content should be divided.
- Default value is auto.
- Helps improve content readability and presentation.
- Commonly used for articles, blogs, and long text sections.
- Works as part of CSS Multi-column Layout.
Syntax:
column-count: number|auto|initial|inherit;
Property Values:
- number: This value is used to indicate the number of columns.
- auto: It is the default value. The number of columns is determined by other properties.
- initial: This value is used to set the property to the default value.
- inherit: It inherits the property from its parent.
Example 1: Shows the use of the column-count property.
Example 2: