<br>
br tag
The HTML <br>
element introduces a line break within text. It is particularly useful for formatting content like addresses or poetry, where maintaining line separation is essential.
Syntax
Text before the line break <br>
Text after the line break
br
Demo
To force
line breaks
in a text,
use the br
element.
<h1>The br element</h1>
<p>To force<br> line breaks<br> in a text,<br> use the br<br> element.</p>
<br>
element is commonly used to add line breaks in postal addresses.Attributes
This element supports global attributes.
See also
Conclusion
The <br>
element in HTML is used to insert line breaks, ensuring proper text formatting for cases like poetry or addresses. It is a self-closing tag, meaning it does not require an end tag. By introducing line breaks, it helps improve text readability and layout when needed.
<blockquote>
The HTML <blockquote> element is used to indicate a section of text that is quoted from another source, often displayed with indentation to distinguish it from the rest of the content.
<center>
The HTML <center> element, now deprecated, was utilized to center text or content within its container. CSS is now the preferred method for alignment and layout.