HTML <pre> tag

HTML <pre> tag : Definition


• The HTML <pre> tag displays preformatted text preserving both whitespace and line breaks in the HTML document.

• The text is by default rendered in monospace font and also displays in a fixed-width, font-size and space between each words relatively.


Html <pre> tag example

<!DOCTYPE html>
<html>
<body>
	<pre>The Text goes here    preserving the whitespace
  and preserving line breaks</pre>
</body>
</html>

Output :


 
 The Text goes here    preserving the whitespace
  and preserving line break here