Wednesday, April 29, 2015

HTML Paragraphs Elements

HTML Line Breaks


The HTML <br> element defines a line break.
Use <br> if you want a line break (a new line) without starting a new paragraph.

<p>This is<br>a para<br>graph with line breaks</p>

<br> element is an empty HTML element. It has no end tag.

HTML <pre> Element


The HTML <pre> element defines preformatted text.
The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks.

<p>
<pre>
  My Bonnie lies over the ocean.

  My Bonnie lies over the sea.

  My Bonnie lies over the ocean.

  Oh, bring back my Bonnie to me.
</pre>
</p>

Don't Forget the End Tag


Most browsers will display HTML correctly even if you forget the end tag.
Forgetting the end tag can produce unexpected results or errors.



0 comments:

Post a Comment

Thanks For Coming The Page.