HTML - The <pre> (preformatting) tag

When we write a HTML code in notepad. we will use spaces, will press enters so we can orientate easier in searching of the mentioned part. A browser will interpret the code as a single line though, ignoring the spaces and enters mentioned above.

For that we have the <pre> tag which makes the browser viewing be the same with the notepad one.

 

<pre>

It's a thief in the night

To come and grab you

It can creep up inside you

And consume you

</pre>

Display

It's a thief in the night

To come and grab you

It can creep up inside you

And consume you