HTML Paragraph Tags

HTML Paragraph Tags i.e. <p> represent a paragraph that contains top and bottom margins. This margin is generated by default, commonly known as user agent style.

Tips:

You have to use the opening paragraph tag <p> and closing paragraph tag </p>. So that readability might be better.

HTML paragraph starts with <p> tag and end with closing </p> Tag.Please keep in mind that you have to put a closing tag at the end of the paragraph tag.

        <p>This is a paragraph having by default margin.</p>   

How To Eliminate By Default Margin Of The Paragraph

Tips:

       p{margin:0;}    

Creating Line Breaks

Generally <br> tag is used to create a line break of the web page. Please note that the <br> tag does not have a closing tag.

Source Code

          <p>This is a paragraph having by default margin.</p><br />
<p>This is another paragraph having also by default margin.</p>
        
Try it now

The <br> tag breaks the paragraph and starts with a new line.

Horizontal Line

To create horizontal line within web page ,generally <hr> tag is used.It is also an empty tag that does not have a closing tag. This tag just draws a horizontal line and separates the web page contents.

Source Code

          <p>This is a paragraph that supports horizontal line break.</p><hr />
<p>Another paragraph tag that has by default margin.</p>
        
Try it now

Horizontal Line

To create horizontal line within web page ,generally <hr> tag is used.It is also an empty tag that does not have a closing tag. This tag just draws a horizontal line and separates the web page contents.

Online Test / Quiz

Web Tutorials

HTML Paragraph Tags
Html Tutorial HTML
Javascript Tutorial JAVASCRIPT
Css Tutorial CSS
Bootstrap 5 Tutorial BOOTSTRAP 5
Bootstrap 4 Tutorial BOOTSTRAP 4