Tutorials /HTML /HTML Line Break

HTML Line Break

💡 HTML Line Break Summary
  • The <br> tag is used to create a line break in HTML.
  • It does not require a closing tag.
  • Useful for breaking lines inside paragraphs, addresses, or poems.

The <br> tag is an empty tag, meaning it has no closing tag. It simply moves the text to the next line.

💡 Important: Unlike paragraphs, <br> does not add extra space, just breaks the line.
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Line Break Example</title>
</head>
<body>

<p>This is the first line.<br>
This is the second line.<br>
This is the third line.</p>

</body>
</html>
Preview:

This is the first line.
This is the second line.
This is the third line.

⚠️ Warning: Use <br> only for line breaks inside a paragraph. Do not use it to separate large blocks of content; instead, use <p> tags.

The Coding Journey provides high-quality, beginner-friendly, and advanced web development tutorials. Learn React, Next.js, JavaScript, Tailwind CSS, and more with hands-on projects. Build faster, code smarter, and level up your skills! 🚀

© 2025 All Rights Reserved | The coding journey