Style columnCount Attribute

Definition and Usage

columnCount This attribute specifies how many columns the element should be divided into.

See also:

CSS3 Tutorial:CSS Multicol

CSS Reference Manual:column-count attribute

Example

Split the text in the div element into three columns:

document.getElementById("myDIV").style.columnCount = 3;

Try It Yourself

Syntax

Return columnCount attribute:

object.style.columnCount

Set columnCount attribute:

object.style.columnCount = "number|auto|initial|inherit"

Attribute Value

Value Description
number The best number of columns to divide the element content.
auto Default value. The number of columns is determined by other attributes, such as "column-width".
initial This attribute is set to its default value. See initial.
inherit This attribute inherits from its parent element. See inherit.

Technical Details

Default value: auto
Return value: string representing the column-count attribute.
CSS Version: CSS3

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
50.0 10.0 52.0 10.0 37.0