HTML

What is the purpose of the pre html tag?

Written by Ian Carnaghan · 19 sec read >

The text displayed within a pre element is displayed in a fixed width and a default fontSpaces and line breaks are both displayed as typed. So text that you typed within a pre tag will be displayed exactly how you typed it.

Example:

<pre>
This is    a test within
a pre html       Tag
</pre> 

The above will ouput:

  This is  a test within
a pre html   Tag

The same text without the pre tag will display the following output:

This is a test within a pre html Tag

Last Updated On March 22, 2018
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. In my spare time I teach undergraduate classes in web development. Profile

Leave a Reply

avatar
  Subscribe  
Notify of