In this tutorial, learn how to add text content using the HTML Paragraph tag. You can display your text content with more than few lines by putting it inside <p> start tag and </p> close tag.
When you start a blogging website, you also require to add some content. HTML <p> tag is the required tag bloggers can use to add blog content. It automatically adds a margin to the above and below each paragraph.
Syntax
1 |
<p>Enter your text content here...</p> |
Example
1 |
<p>This is a simple paragraph.</p> |
Output
This is a simple paragraph.
HTML paragraph tag with two para
If you want to add more than one paragraph on your content. You have to use the below example.
1 2 |
<p>This is my first paragraph</p> <p>This is my second paragraph</p> |
Output
This is my first paragraph
This is my second paragraph
The example adds two or more than two paragraphs on the content of a page. Similarly, you can add more content according to your requirements.
Line Breaks Inside Paragraph tag
A single line break slips down the further content below one line. It
<br> tag is used to insert a line break inside a paragraph.
1 |
<p>This is my paragraph with<br> line break</p> |
Output
This is my paragraph with
line break
HTML paragraph with justify aligned Text
If you want to make your HTML Paragraphs in justified aligned format as of word doc, then you have to use <p align=”justify”>.
1 |
<p align="justify">This is my paragraph with justified aligned format to put my text inside HTML looks same format as of word document. The word documents looks really cool and you can also make your HTML paragraphs as of it. The alignment option justification can make your HTML paragraph show in a justified way.</p> |
Output
This is my paragraph with the justified aligned format to put my text inside HTML looks the same format as of word document. The word documents look really cool and you can also make your HTML paragraphs as of it. The alignment option justification can make your HTML paragraph show in a justified way.
HTML Paragraph with center aligned text
If you want to make your HTML Paragraphs centered aligned , then you have to use <p align=”center”>.
1 |
<p align="center">This is my paragraph with centered aligned format to put my text inside HTML looks same format as of word document with centered aligned text. The word documents looks really cool and you can also make your HTML paragraphs as of it. The alignment option centered can make your HTML paragraph show in a centered aligned way</p> |
Output
This is my paragraph with the centered aligned format to put my text inside HTML looks the same format as of word document with centered aligned text. The word documents look really cool and you can also make your HTML paragraphs as of it. The alignment option centered can make your HTML paragraph show in a centered aligned way.
HTML Paragraph with left aligned text format
If you want to make your HTML Paragraphs left aligned , then you have to use <p align=”left”>.
1 |
<p align="left">This is my paragraph with left aligned format to put my text inside HTML looks same format as of word document with left aligned text. The word documents looks really cool and you can also make your HTML paragraphs as of it. The alignment option left can make your HTML paragraph show in a left aligned way.</p> |
Output
This is my paragraph with left-aligned format to put my text inside HTML looks the same format as of word document with left-aligned text. The word documents look really cool and you can also make your HTML paragraphs as of it. The alignment option left can make your HTML paragraph show in a left-aligned way.
HTML Paragraph with right aligned text format
If you want to make your HTML Paragraphs right aligned , then you have to use <p align=”right”>.
1 |
<p align="left">This is my paragraph with right aligned format to put my text inside HTML looks same format as of word document with right text. The word documents looks really cool and you can also make your HTML paragraphs as of it. The alignment option right can make your HTML paragraph show in a right aligned way.</p> |
Output
This is my paragraph with right-aligned format to put my text inside HTML looks the same format as of word document with right-aligned text. The word documents look really cool and you can also make your HTML paragraphs as of it. The alignment option right can make your HTML paragraph show in a right-aligned way.