You have already used this but without much explanation. HTML pre elements can be used to contain text. If they are the browser will render the text exactly as you (or PHP) generated it.
Create a new HTML file called pre.html. Under the h1 add text and some extra spaces and line breaks by pasting in this:
This is just text and not a paragraph In this editor there are line breaks but an HTML browser will remove them just as it will extra spaces.
Try the page in a browser.
Now enclose that text (the whole thing) in a pair of pre tags to create a pre element. Save and try again. This can be useful for showing code (tabs are preserved) or the contents of arrays (especially with the use of print_r in PHP).