The HTML Paragraph

In this tutorial you will learn HTML paragraph <p> tag. How we can use HTML <p> tag in our web pages. This tag comes into pairs. The text written in between <p> and </p> tag. If the closing HTML element is exclude, then it will considered by web browser that the end of paragraph go with the start if bext block property. t is a an important point that a web browser add an empty line before and after a paragraph. An HTML <p> paragraph tag indicates the starting of a new paragraph. Let’s take a look at a simple example to see how it’s work.
Example:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <p>This is a paragraph</p>
  </body>
</html>

Space inside HTML Paragraph

If you insert various spaces inside the HTML <p> tag, browser will remove extra spaces and extra line while showing the web page. The web browser sum up number of spaces and lines as a single one. Or if you want to put space in your web page then you should put &nbsp; character between <p> tag.
Example:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
<p>  
I am going to provide you a tutorial on HTML and hope
that it will be very beneficial for you.  
</p> 
    <p>&nbsp; Addded a space</p>
<p>  
You cannot determine the display of HTML</p>  
<p>because resized windows may create different result.  
</p>  
    </body>
</html>

How to Use <br> and <hr> tag with paragraph?

An HTML <br> element is used for put a line break in web page and it can be used with paragraph elements. Below example will show you how to use <br> with <p> element.

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <h2> Use of line break with pragraph tag</h2>  
          <p><br>Papa and mama, and baby and Dot,  
     <br>Willie and me?the whole of the lot  
    <br>Of us all went over in Bimberlie's sleigh,                 <br>To grandmama's house on Christmas day.
          </p>  
   </body>  
</html>  

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top