+ 2
Pre tag is used for?
4 ответов
+ 5
If you want everycharacter(spaces,linebreaks , text as you have write in code you should use pre tag.
Ex- <pre>this
Is
Pre</pre>
Result:-
this
Is
Pre
If you write
<p>this
Is
Pre</p>
Result:-
this is pre
So pre tag preserve you spaces and line break in result as you have done in code.
+ 7
`
The HTML <pre> tag is used for indicating preformatted text. The code tag surrounds the code being marked up. Browsers normally render pre text in a fixed-pitched font, with whitespace in tact, and without word wrap.
`
From
https://www.tutorialspoint.com/html/html_pre_tag.htm
+ 7
Pre tag is used for preformatted text.
Text in a <pre> element is displayed in a fixed-width font, and the text preserves both spaces and line breaks.
Also see this link it will help you.
https://www.w3schools.com/tags/tag_pre.asp
+ 4
If you want to use whitespace and line breaks in your web page then you can use <pre> tag. It will helps you to write pre-formatted text.