<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
pre, p {
background-color: lightblue;
}
.display_whitespace {
white-space: pre;
}
</style>
</head>
<body>
<pre> I am Text
with
whitespace displayed</pre>
<p>I am Text with whitespace ignored</p>
<p class="display_whitespace">I am Text with whitespace preserved</p>
</body>
</html>