+ 2
<p> and <pre>
What is the different between <p> and <pre>?
3 Respuestas
+ 4
p defines a paragraph which don’t preserve line spaces
ex:
<p> Hello
World </p>
output: Hello World (single line)
pre defines pre formatted text which preserves line spaces
ex:
<pre> Hello
World </pre>
output:
Hello
World
(double line)
+ 3
<p> ignores extra whitespaces
<pre> preserves whitespaces
+ 3
Newlines entered are preserved in <pre> tags.