SyntaxStudy
Sign Up
HTML Beginner 5 min read

HTML Paragraphs

HTML Paragraphs

A paragraph is defined with the <p> tag. Browsers automatically add a single blank line before and after each paragraph. You cannot control the output by adding extra spaces or blank lines inside the HTML source — the browser ignores them.

Line Breaks and Horizontal Rules

Use the <br> tag when you need a line break without starting a new paragraph, such as in a poem or address. The <hr> tag creates a thematic break — a horizontal line — between sections of content. Both are void elements and need no closing tag.

  • <p> — Block-level paragraph
  • <br> — Inline line break
  • <hr> — Thematic section divider
Example
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Paragraphs</title>
</head>
<body>
  <h1>About Paragraphs</h1>

  <p>This is the first paragraph. It contains
  multiple lines in the source, but the browser
  collapses all whitespace into one line.</p>

  <p>This is the second paragraph.</p>

  <hr>

  <h2>A Poem</h2>
  <p>
    Roses are red,<br>
    Violets are blue,<br>
    HTML is great,<br>
    And so are you.
  </p>
</body>
</html>
Pro Tip

Never use empty <p></p> tags or multiple <br> tags just to add spacing — use CSS margin and padding instead for clean, maintainable layouts.