I don't think I quite understand the context of your question. In HTML there's a PRE element, which stands for preformatted, which will display text as it comes.
Code:
<pre>
These
linebreaks
will
all
be
displayed.
</pre>
You can also apply whitespace

re to other elements using CSS.