Edit This Code:
<!DOCTYPE html>
<html>
<body>

<div id="myDiv" style="white-space:nowrap;">
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
</div>
<br>

<button type="button" onclick="myFunction()">Return the whiteSpace property</button>

<script>
function myFunction() {
    alert(document.getElementById("myDiv").style.whiteSpace);
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy