Paragraphs, Line Breaks, and Thematic Breaks
HTML Living Standard
Use a paragraph for a group of sentences about one idea. Use a line break where a line needs to end within that paragraph. A thematic break marks a larger change, such as a change of scene in a story.
On this page
How a paragraph is rendered
Write a paragraph between <p> and </p>. The browser shows each paragraph separately, usually with space above and below. In normal whitespace handling, a line break or several spaces in the markup collapse to a single space between words. The browser wraps long text based on the available space.
How to try it In index.html, replace the content between <body> and </body> with this example. Save the file and reload it in the browser.
<p>The library lends books
and magazines every morning.</p>
<p>Returns are accepted until 6:00 PM.</p>
What to expect “books and magazines” flows as part of one paragraph even though it spans two source lines. “Returns” starts a new paragraph.
What can go inside <p>
A paragraph can contain text and phrasing elements such as a, strong, and em. A list or heading belongs next to the paragraph in the HTML structure. If a div starts before you close p, the HTML parser closes the paragraph automatically and the DOM differs from what the indentation might suggest.
How to try it In index.html, replace the content between <body> and </body> with this example. Save the file and reload it in the browser.
<p>Choose <em>one</em> of the available books.</p>
<ul>
<li>History</li>
<li>Science</li>
</ul>
What to expect DevTools shows the p and ul as siblings. The em element is a child of the paragraph.
Intentional line breaks <br>
Use br when a line break is part of the content, such as an address or a poem. For a new idea, start a new paragraph. For more space between paragraphs, adjust their CSS margins.
How to try it In index.html, replace the content between <body> and </body> with this example. Save the file and reload it in the browser.
<p>Library Desk<br>25 Market Street<br>Yangon</p>
What to expect The address occupies three lines within one paragraph.
Thematic Break <hr>
Use <hr> between paragraphs where a story changes scene or a section switches to a different topic. Most browsers draw a horizontal line at that point. Write <hr> on its own because it is a void element.
How to try it In index.html, replace the content between <body> and </body> with this example. Save the file and reload it in the browser.
<p>The hikers reached the campsite before sunset.</p>
<hr>
<p>Back in town, the team prepared for the next day.</p>
What to expect The line between the paragraphs marks the change of scene from the campsite to the town.