💡 Tip: Login now to track your course progress and unlock your downloadable certificates instantly!

HTML Paragraphs

Paragraphs are the foundation of text content on any webpage.
In HTML, the <p> tag is used to define a paragraph — separating blocks of text and improving readability for both users and browsers.

What Is an HTML Paragraph?

An HTML paragraph is created using the <p> element.
Browsers automatically add space before and after each paragraph to make text easier to read.

Paragraph Example
<p>This is my first paragraph.</p>
<p>This is another paragraph with more text.</p>

Each paragraph is treated as a separate block of content.

How Browsers Handle Paragraphs

  • Browsers ignore extra spaces or line breaks inside a paragraph.
  • Even if you press Enter or add multiple spaces, HTML will display them as a single space.
Example
<p>This
is     one
paragraph.</p>

Output

This is one paragraph.

💡 To create actual line breaks, use the <br> tag (explained later).

Paragraph Styling with CSS

Example
<p style="color: #29AB87; font-size: 18px; line-height: 1.6;">
HTML paragraphs make your text organized and easy to read.
</p>

Common properties to style paragraphs:

  • color — text color
  • font-size — size of text
  • line-height — spacing between lines
  • text-align — alignment (left, center, right, justify)

Aligning Text in Paragraphs

Example
<p style="text-align:center;">This paragraph is centered.</p>
<p style="text-align:right;">This paragraph is aligned to the right.</p>
<p style="text-align:justify;">This paragraph is justified like in newspapers.</p>

Alignment improves presentation and helps with layout design.

Nested Elements Inside Paragraphs

You can include inline elements (formatting tag) such as <b>, <i>, <strong>, <em>, or <a> inside paragraphs.

Example
<p>HTML <strong>paragraphs</strong> can include <em>formatted text</em> and <a href="#">links</a>.</p>

Things to Remember

  • Paragraphs cannot contain block-level elements (like <div> or <h1>).
  • Always close the paragraph tag (</p>).
  • Avoid leaving empty <p></p> tags — they create unwanted space.

Conclusion

HTML paragraphs structure your text and make your web content clean, readable, and accessible.
Use them properly to separate ideas, add spacing, and create a natural reading flow for visitors.

Sign In Form

User your email and password to singn in

Don’t have an account, signup here : 

HTML5 & CSS3

Tools and Tutorials

Want a Website

Want a website for your business ?

Please fill out the details below, so we can reach out to you.

Registration Form

Signup to track your record and much more.

We have sent you an email with a registration link. Please click the link to verify your email address, or enter the 6-digit OTP provided in the email.

Didn't receive the OTP. Regenerate OTP Resend