The "pre" tag
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
Post a Comment