A paragraph always starts on a new line, and is usually a block of text.
<p> tag use to describe paragraph in web page. A paragraph always starts on a new line, and browsers automatically add some white space (a margin) before and after a paragraph.
With HTML, you cannot change the display by adding extra spaces or extra lines in your HTML code.
The browser will automatically remove any extra spaces and lines when the page is displayed, you can see in the above example.
HTML Horizontal Rules
<hr> tag defines a thematic break in an HTML page and is most often displayed as a horizontal rule.
<hr> element is used to separate content (or define a change) in an HTML page. It adds a horizontal line.
<hr> tag is an empty tag, which means that it has no end tag.
HTML Line Breaks
<br> element defines a line break. Use if you want a new line without starting a new paragraph.
<br> tag is an empty tag, which means that it has no end tag.
The Poem Problem
<p> tag can’t display poem as poem style. See the following.
Solution – The HTML <pre> Tag
<pre> tag is used to preserve the white space and lines in the text.
Hope you like this tutorial. Try this all by your self.
Previous: #6 HTML Headings
Next: #8 HTML Text Formatting