HTML pre tag

The pre tag is used to display preformatted text in HTML document. pre tag preserves the content structure it can be used to show pre-formated data stored in the database and in another documents and to show computer codes programs to HTML document.

Syntax:

Example:

Result:

Pre tag can also be used to represent formatted computer codes like programing language code to show in HTML document like below

Example:

Result: