HTML br tag

HTML br tag breaks one line text into multiline text. It is empty type element.

<p>
 This text can <br>
 be broken into two <br>
 lines.
 <br>
 The br tag is breaking a paragraph into multiple lines.
</p>

</>

This text can
be broken into two
lines.
The br tag is breaking a paragraph into multiple lines.

In the above example, if we do not use br tag and break the paragraph then paragraph retains its behavior.

But the presence of br tag causes the single line paragraph to break into a multiline paragraph.

Tag Uses

Specific uses of <a> tag

Common uses of br element.

  • poem

  • address

Instead of using br elements for presentational purposes pre element should be used.

Tag omission

br is self-closing tag (<br />) i.e. there is no end tag.

Global Attributes

All the global attributes are applicable on the br element.



Was this article helpful?