<style type="text/css">
.wrapit {
white-space: pre-wrap;
}
</style>
Then use as follows.
<pre class="wrapit">
...
</pre>
If you write “pre” instead of “.wrapit”, all pre tags will be wrapped and no CSS class needs to be specified. You can also directly insert the style information:
<pre style="white-space: pre-wrap">
...
</pre>