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 works. It is an IMPORTANT point that a browser itself adds an empty line before and after a paragraph. An HTML <p> tag indicates the start of a new paragraph.


Example:


<!DOCTYPE html>
<html>
<head>
</head>
<body>

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

</body>
</html>

Live Demo!


Output:

This is a paragraph.

This is a another paragraph.



Creating Horizontal Rules


You can use the <hr> tag to create horizontal rules or lines to visually separate content sections on a web page. Like <br>, the <hr> tag is also an empty element.
Here's an example:


Example:


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

Live Demo!


Output:

This is a paragraph.


This is a another paragraph.


Do you know how to Use <hr> tags with paragraphs?


An HTML <hr> tag is used to apply a horizontal line between two statements or two paragraphs. Following is the example which is showing the use of <hr> tag with paragraphs.


Example:


<!DOCTYPE html>
<html>
<head>
<title> My First HTML Page </title>
</head>
<body>

<h2> Example to show a horizontal line
with paragraphs </h2>
<p> An HTML hr tag draw a horizontal line
and separate two paragraphs with that line.
<hr>it will start a new line.
</p>

</body>
</html>

Live Demo!


Output:

Example to show a horizontal line with paragraphs

An HTML hr tag draw a horizontal line and separate two paragraphs with that line.


it will start a new line.