HTML5
Where to use <br>, <br/> and <br /> ?
The <br> element inserts a single line break. A frequent question is which of <br>, <br/>, or <br /> is correct. The answer: all three render identically and are accepted by browsers, but <br> is the recommended HTML5 form because <br> is a void (empty) element that never has a closing tag.
Direct Answer
<br> is a void element — it has no content and no closing tag. In HTML5 the plain <br> is the preferred and canonical form. The self-closing slash in <br/> and <br /> is optional syntax carried over from XHTML; browsers simply ignore the extra slash, so all three behave the same.
| Form | Valid in HTML5? | Notes |
|---|---|---|
| <br> | Yes (recommended) | Canonical HTML5 void-element form |
| <br/> | Yes | Slash allowed but redundant |
| <br /> | Yes | XHTML style, common in JSX/XML contexts |
Runnable Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Line Break Demo</title>
</head>
<body>
<p>First line<br>Second line (using <br>)</p>
<p>First line<br/>Second line (using <br/>)</p>
<p>First line<br />Second line (using <br />)</p>
<address>
123 Web Street<br>
Pune, India<br>
411001
</address>
</body>
</html>Do not use <br> to create spacing between paragraphs or blocks. Use CSS margins/padding for layout. <br> is only for line breaks WITHIN a block of text, such as an address or a poem.
When to Use <br>
- Postal addresses where each line matters.
- Poems, song lyrics, or where line breaks are part of the content.
- Not for visual spacing — that is a CSS job.
Key Takeaways
- All three forms are valid and render an identical line break.
- <br> is the correct, canonical HTML5 form.
- <br> is a void element with no closing tag.
- Use CSS, not <br>, for spacing.
