Back to subject
HTML5/HTML Paragraphs and Line Breaks

Write a Small Introduction

Practical lesson

Let's practice normal text with paragraphs and a few useful text-break elements.

- Use <p> when the content is a paragraph or a complete block of normal text. - Close each paragraph with </p> so the browser knows where that block ends. - A new <p> creates a new paragraph; do not use many spaces to fake a paragraph break. - Use <br> when a line break is part of the content itself, such as a postal address or a poem line. - Use <hr> when you want to mark a thematic break between sections of content. - Do not use <br> repeatedly just to create large empty gaps. CSS handles layout spacing. - Read the example and notice that each paragraph is a separate block. - Notice that <br> stays inside a paragraph when the line break belongs to that same piece of content.

The important difference is simple: <p> creates a paragraph, <br> creates a line break inside content, and <hr> represents a thematic separation.

Try it yourself
Code

Starter example

Code
<h1>About Me</h1>
<p>My name is Sam.</p>
<p>I am learning HTML.</p>
<p>Line one<br>Line two</p>
Live preview