In this blog, I am going to cover about Paragraph in html tag, If you are a Html learners you should read this blog till end.
Every web page have at least a content , In world there are not websites without content.
For that content paragraph <p> tag is very useful, It defines the paragraph in web pages.
It start with <p> tag and end with </p> tag.
Let’s understand Paragraph in html tag with below example.
<p> This is my first paragraph </p> <p> This is my second Paragraph </p> <p> This is my third Paragraph </p>
Below will be the result
You can see each paragraph started with new line.
Now we we will understand how you can use html heading tags with paragraph
<h2>Topic 1 </h2> <p> This is my first paragraph </p> <h2>Topic 2 </h2> <p> This is my second Paragraph </p> <h2>Topic 3 </h2> <p> This is my third Paragraph </p>
Let’s see it’s result
Here you can see how you can use html heading for subtitles of your topic and then it’s content , So it becomes easy for your readers to understand your structure of content and make it easy for reading.
Now suppose you want to add break between your content without paragraph. So how you can do that.
If you remember in our List of Basic Html tags topic we explained about some basic tags where we explained about </br> tag. </br> tags is used for break the line.
Let’s understand it with simple example.
<h2>Topic 1 </h2> <p> This is my first paragraph.</br> Lorem ipsum lorem ipsum lorem ipsum </p> <h2>Topic 2 </h2> <p> This is my second Paragraph </p> <h2>Topic 3 </h2> <p> This is my third Paragraph </p>
Here you can see we have add </br> tag in first paragraph , Let’s see its output as below
Here you can see there are no space between first line and second line in first paragraph so I hope you understand the difference between paragraph <p> and </br> tags.
Now if you want to make some separation between paragraphs to make it more formatted ways so you can add </hr> tag to draw a line , Let’s understand with below example
<h2>Topic 1 </h2> <p> This is my first paragraph.</br> Lorem ipsum lorem ipsum lorem ipsum </p> <hr/> <h2>Topic 2 </h2> <p> This is my second Paragraph </p> <hr/> <h2>Topic 3 </h2> <p> This is my third Paragraph </p> <hr/>
You can see that after every paragraph I have added </hr> , Now let’s see the result as below
You can see that now it’s looks something better.
You cans see a line after every paragraph.
Hope you find this Blog very useful for you and you can learn html with us like this, So please stay connected and visit us again. Have a wonderful day!