<html>
<body>
<div id="myDiv" style="background:beige; width:400px;">
Line1.<br>
This sentence has line 1
line 2
and
<br>
<br>
<br>
<br>
<br>
line 3
<br>
This is a regular block of text.
</div>
<br>
<button onclick="myDiv.style.whiteSpace='normal';">Set whiteSpace property to:normal</button>
<button onclick="myDiv.style.whiteSpace='pre';">Set whiteSpace property to: pre</button>
</body>
</html>