HTML Preformatted text

<pre> tag in HTML

The <pre> tag is defined as Preformatted text.

The <pre> tag is used to show whatever you had given, including space and new line space.

Usually HTML does not allow more than once space and new lines.

Example 1

Try Yourself

Example 2

Try Yourself

Example 3 - Difference between with and without using <pre> tag

Try Yourself