The <p>
tag is used to define paragraphs in HTML. Paragraphs are blocks of text that are separated from other blocks of text by vertical space. HTML automatically adds space before and after a paragraph, and the text within the paragraph is usually displayed in a block format.
<p>
TagHere are examples of how to use the <p>
tag to create paragraphs:
This example shows a single paragraph created using the <p>
tag:
<p>This is a single paragraph.</p>
This is a single paragraph.
HTML allows you to create multiple paragraphs, each separated by a <p>
tag:
<p>This is the first paragraph.</p>
<p>This is the second paragraph.</p>
This is the first paragraph.
This is the second paragraph.
For long texts, you can use multiple <p>
tags to break the content into readable chunks. Each paragraph will be displayed with space above and below, enhancing readability:
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lacinia odio vitae vestibulum. Suspendisse potenti.</p>
<p>Curabitur nec elit ac nulla euismod laoreet. Donec vehicula interdum metus, eu posuere nisl dictum sit amet.</p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lacinia odio vitae vestibulum. Suspendisse potenti.
Curabitur nec elit ac nulla euismod laoreet. Donec vehicula interdum metus, eu posuere nisl dictum sit amet.