The two ways to break a line in HTML
To move text to a new line in HTML, use the <br> tag. This is a self-closing tag — it stands alone and needs no closing partner. Type <br> wherever you want the line to break, and the text after it will jump to the next line.
The second method is to use a block element like <p> (paragraph), <div> (division), or <h2> (heading). Each block element automatically starts on a new line and creates space above and below itself. Use block elements when you want to separate chunks of content; use <br> when you want a straightforward line break within the same block.
Most of the time, block elements are the right choice. The <br> tag is useful for poetry, addresses, or other content where line breaks matter to the meaning — not just for spacing paragraphs apart.
Key Takeaways
- The <br> tag creates a single line break and requires no closing tag.
- Block elements like <p>, <div>, and <h2> automatically start on a new line and add space around themselves.
- Use <br> for line breaks within content where the break itself carries meaning, like in addresses or verse.
- Use block elements to separate distinct sections of content, because they are easier to style and more predictable across browsers.
Using the <br> tag for a straightforward line break
The <br> tag is the most direct way to move text down one line. Write it exactly as <br> or <br /> — both work in modern HTML. Do not write <br></br> with a closing tag; that is incorrect.
Here is an example. If you type:
<p>123 Main Street<br>Springfield, IL 62701</p>
The browser will display the address on two lines, with "123 Main Street" on the first line and "Springfield, IL 62701" on the second. The <br> tag does nothing but break the line — it adds no extra space or styling.
A common mistake is using multiple <br> tags to create space between sections. This works visually but is poor practice because it mixes content with spacing. Use block elements instead, which let you control spacing with CSS later if you need to.
Using block elements to separate content
Block elements like <p>, <div>, <section>, and headings (<h1>, <h2>, etc.) automatically start on a new line and add space around themselves. Each one is its own container.
If you type:
<p>This is the first paragraph.</p> <p>This is the second paragraph.</p>
The browser will display each paragraph on its own line with space between them. You do not need a <br> tag — the block element handles it. The space between paragraphs comes from the browser's default margin, which you can change with CSS if you want tighter or looser spacing.
Block elements are the standard way to structure a page. Use them to wrap related content — a paragraph of text, a list, a heading, a section of a form. This makes your HTML clearer to read and much easier to style later.
When to use <br> versus block elements
Use <br> when a line break is part of the content itself. Poetry, song lyrics, mailing addresses, and credit lines are good examples. The break carries meaning — removing it would change what the reader sees.
Use block elements for everything else. Paragraphs, sections, lists, and headings should all be block elements. This approach is cleaner, more flexible, and follows the standard structure that browsers and assistive technologies expect.
A practical rule: if you are tempted to use multiple <br> tags in a row to create space, stop and use a block element instead. If you are breaking a line within a single logical unit (like an address inside one paragraph), <br> is correct.
The difference between <br> and pressing Enter in your code
Pressing Enter in your HTML file does not create a line break in the browser. The browser ignores whitespace — extra spaces, tabs, and line breaks in your code are all treated as a single space. This is called whitespace collapsing.
If you type:
<p>Line one Line two</p>
The browser will display both lines on the same line, because the Enter key in your code is just whitespace. To actually break the line, you must use <br>. This separation between code formatting and browser display is intentional — it lets you write readable code without affecting how the page looks.
Common mistakes with line breaks
The most common error is writing <br></br> with a closing tag. The <br> tag is self-closing and needs no partner. Writing a closing tag will not break your page, but it is incorrect HTML.
Another mistake is using <br> to create space between paragraphs. This works visually but makes your code harder to maintain. If you later want to change the spacing, you have to edit the HTML instead of adjusting CSS. Use <p> tags instead and control spacing with margins.
A third error is forgetting that <br> only breaks the line — it does not add extra space. If you want a blank line between content, use two block elements, not two <br> tags. The visual result is similar, but the code is clearer.
Frequently Asked Questions
Can I use <br> to indent or add space before text?
No. The <br> tag only breaks the line; it does not add indentation or leading space. To indent text, use CSS with padding or margin, or use the <blockquote> tag for quoted material. This keeps your HTML focused on structure and your CSS focused on appearance.
What is the difference between <br> and <br />?
Both are correct in modern HTML. The <br /> syntax comes from XHTML and is more explicit about self-closing, but <br> alone is simpler and equally valid. Use whichever your team prefers — the browser treats them identically.
Should I use <br> inside a <p> tag?
Yes, <br> is designed to work inside paragraphs and other text containers. It is the correct way to break a line within a single logical block of content, like an address or a poem. Just avoid using multiple <br> tags to create space between separate sections.
How do I create a blank line between paragraphs?
Use two separate <p> tags, one after the other. The browser's default margin will add space between them automatically. If you need more or less space, adjust the margin with CSS instead of adding extra <br> tags.
Can I style a <br> tag with CSS?
You can add CSS to <br>, but it has limited effect because <br> is not a container — it is just a line break. You can change its display property or add margins, but most styling will not work as expected. For more control, use block elements instead.