0
0
HTMLmarkup~5 mins

Paragraphs in HTML

Choose your learning style9 modes available
Introduction

Paragraphs help organize text into separate blocks. They make reading easier by breaking content into small parts.

When writing a story or article on a webpage.
To separate different ideas or topics in text.
When adding descriptions or explanations in a web page.
To improve readability of long text content.
When you want to add space between blocks of text.
Syntax
HTML
<p>Your paragraph text goes here.</p>

The <p> tag defines a paragraph.

Browsers add space above and below paragraphs automatically.

Examples
A basic paragraph with some text inside.
HTML
<p>This is a simple paragraph.</p>
Two separate paragraphs will appear with space between them.
HTML
<p>Paragraph one.</p>
<p>Paragraph two.</p>
Line breaks in code do not create new lines in the browser. Use <br> for line breaks.
HTML
<p>This paragraph
has a line break
inside the text.</p>
You can add formatting inside paragraphs using tags like <strong> and <em>.
HTML
<p>This paragraph contains <strong>bold</strong> and <em>italic</em> text.</p>
Sample Program

This webpage shows three paragraphs inside a section. Each paragraph is separated by space automatically.

HTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Paragraph Example</title>
</head>
<body>
  <main>
    <section>
      <h1>My First Webpage</h1>
      <p>Welcome to my webpage. This is the first paragraph.</p>
      <p>Here is another paragraph with more information.</p>
      <p>Paragraphs help keep text clear and easy to read.</p>
    </section>
  </main>
</body>
</html>
OutputSuccess
Important Notes

Paragraphs automatically add vertical space before and after them.

Do not use multiple <br> tags to create paragraph spacing; use separate <p> tags instead.

Paragraphs improve accessibility by helping screen readers understand text structure.

Summary

Use <p> tags to create paragraphs in HTML.

Paragraphs separate text into readable blocks with space around them.

Always use paragraphs to organize text content on webpages.