HTML Paragraphs

HTML Paragraph


HTML paragraph or HTML p tag is used to define a paragraph in a webpage. Let's take a simple example to see how it work. It is a notable point that a browser itself add an empty line before and after a paragraph. An HTML <p> tag indicates starting of new paragraph.

Note: If we are using various <p> tags in one HTML file then browser automatically adds a single blank line between the two paragraphs.

See this example:

<p>This is a paragraph.</p>

<p>This is another paragraph.</p>

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

An HTML <br> tag is used for line break and it can be used with paragraph elements. Following is the example to show how to use <br> with <p> element.

Example:

<!DOCTYPE html>  

<html>  

<head>  

</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> 

Try It

Output:



Comments

Archive

Followers