The "pre" tag

The "pre" tag If you want to insert spaces and line breaks in your paragraphs as you type in any text editor such as "Notepad++" or "Gedit",
you should encapsulate this text in a <pre> tag.
The word "pre" stands for preformatted text.

Example:
<pre> Text in a pre element is displayed in a fixed-width font, and it preserves both spaces and line breaks </pre>

Sample output for the above HTML markup is :-

Text in a pre element
is displayed in a fixed-width
font, and it preserves
both      spaces and
line breaks

The <pre> tag is an extremely imporatant for wriiing code snippets for programming languages which require the code to be intended properly like Python. Just look at the image beow. The <code> should be retained inside the pre tag

Comments

Popular posts from this blog

Parallel Database design, query processing

Laravel | PHP | Basics | Part 2

Apache Hadoop | Running MapReduce Jobs