1 min to read
Paragraphs
This paragraph contains a lot of lines in the source code, but the browser ignores it
<p> element defines a paragraph.
White spaces within p are ignore by the browsers.
Note: Browsers add some white space (a margin) before & after a paragraph.
<p>
This paragraph contains a lot of lines in the source code, but the browser
ignores it.
</p>
<p>
This paragraph contains a lot of spaces in the source code, but the browser
ignores it.
</p>
pre element
In order to get the exact same formatting as in source code we use the pre tag.
<pre>
This paragraph
contains a lot of lines
in the source code,
but the browser
ignores it.
</pre>
<pre>
This paragraph
contains a lot of spaces
in the source code,
but the browser
ignores it.
</pre>
Comments