<!DOCTYPE html>
<
html
>
<
head
>
<
title
>
HTML | DOM Style columnCount Property
</
title
>
<
style
>
#mainDIV {
width: 700px;
height: 50%;
border: 2px solid green;
padding: 10px;
column-count: 4;
}
#p1 {
column-gap: 50px;
}
</
style
>
</
head
>
<
body
>
<
div
id
=
"mainDIV"
>
<
p
id
=
"p1"
><
u
style="color: green;
font-size: 20px;">
Welcome to GeeksforGeeks.!
</
u
><
br
>
An operating system acts as an intermediary
between the user of a computer and computer
hardware. The purpose of an operating system
is to provide an environment in which a user
can execute programs in a convenient and
efficient manner. An operating system is
software that manages the computer hardware.
The hardware must provide appropriate
mechanisms to ensure the correct operation
of the computer system and to prevent user
programs from interfering with the proper
operation of the system.
</
p
>
</
div
>
<
br
>
<
input
type
=
"button"
onclick
=
"mainFunction()"
value
=
"Submit"
/>
<
script
>
function mainFunction() {
// Set columnCount.
document.getElementById(
"mainDIV").style.columnCount = "initial";
}
</
script
>
</
body
>
</
html
>