Paragraphs are defined with the <p> tag. Think of an HTML paragraph as an organized, structural block of text. It is used to keep related sentences together in a dedicated section of a document. The <p> tag is a paired container tag that starts with <p> and ends with </p>. Web browsers automatically start paragraphs on a new line and add default vertical margin spacing before and after the element.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML Paragraphs Example</title>
</head>
<body>
<p>This is a sample paragraph defined using the standard HTML <p> tag.</p>
<p>
Veewom is a comprehensive educational tutorial platform dedicated to empowering BCA students, programmers, and digital creators worldwide.
</p>
</body>
</html>
This is a sample paragraph defined using the standard HTML <p> tag.
Veewom is a comprehensive educational tutorial platform dedicated to empowering BCA students, programmers, and digital creators worldwide.
One of the most important behaviors beginners must understand is whitespace collapsing. In standard HTML, no matter how many consecutive spaces, tabs, or empty carriage return lines you hit in your text editor, the web browser will automatically collapse them down into a single space:
<!-- Code with multiple spaces and line breaks -->
<p>
This sentence has lots of spaces
and multiple
lines.
</p>
<!-- Output rendered by the browser: -->
<!-- "This sentence has lots of spaces and multiple lines." -->
To insert multiple explicit spaces in an HTML paragraph, use the non-breaking space entity: .
Depending on how your content should flow, HTML provides three distinct tags:
| Tag | Type | Behavior & When to Use |
|---|---|---|
<p> |
Paired (Block) | Creates a distinct paragraph block with built-in top/bottom margins. Used for prose, articles, and descriptions. |
<br> |
Void (Empty) | Forces a single line break without adding paragraph spacing. Ideal for postal addresses, poetry, and song lyrics. |
<pre> |
Paired (Block) | Preformatted text displayed in a monospaced font that preserves every space and newline exactly as typed. |
<p>
Department of Computer Applications,<br>
Veewom Institute of Technology,<br>
New Delhi, India - 110001
</p>
<pre>
Line 1: Item A Price: $10
Line 2: Item B Price: $25
Total: Price: $35
</pre>
Mobile devices account for over 60% of all website visits. Long blocks of unbroken text cause visitors to bounce quickly. Follow these professional formatting tips:
<hr> between major subtopics to give readers visual breathing room.line-height of 1.6 to 1.8 for body text.Problem Statement: Write an HTML document representing an official college application letter. Include sender information using <br>, the date, a salutation, two distinct body paragraphs using <p>, an <hr> separator, and a preformatted signature block using <pre>.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Formal Letter - Paragraphs Practice</title>
</head>
<body>
<p>
Rahul Verma<br>
Roll No: BCA-2026-042<br>
Veewom College of Computer Science
</p>
<p><time datetime="2026-09-30">September 30, 2026</time></p>
<p>To The Head of Department,</p>
<p>I am writing to formally request approval for our annual web development workshop. Our batch has completed the HTML5 curriculum and wishes to present live semester projects.</p>
<p>We have already drafted the project proposals and look forward to your affirmative response.</p>
<hr>
<pre>
Sincerely,
Rahul Verma
Student Representative, BCA
</pre>
</body>
</html>
<p> tag is encountered inside an existing paragraph, the browser automatically closes the previous paragraph first.
<hr> element is defined semantically as a thematic break between paragraph-level elements (such as a shift in scene, topic, or section).
text-align property. For example, <p style="text-align: justify;"> justifies the text cleanly across both margins. The legacy HTML attribute <p align="justify"> is deprecated in HTML5.
p::first-letter { font-size: 200%; float: left; font-weight: bold; margin-right: 8px; }. This is widely used in magazine and blog layouts.