🔥 $100K Hit! Where Will Bitcoin Go Next? Find Out Live!

Code has been added to clipboard!

HTML Line Break

Reading time 1 min
Published Mar 19, 2019
Updated Oct 1, 2019

HTML Line Break: Main Tips

  • <br> element adds the HTML line break when the proper line division is necessary.
  • The <br> tags do not have any content.
  • Do not apply this line break HTML element for setting margins between paragraphs. Use <p> and CSS instead.
DataCamp
Pros
  • Easy to use with a learn-by-doing approach
  • Offers quality content
  • Gamified in-browser coding experience
  • The price matches the quality
  • Suitable for learners ranging from beginner to advanced
Main Features
  • Free certificates of completion
  • Focused on data science skills
  • Flexible learning timetable
Udacity
Pros
  • Simplistic design (no unnecessary information)
  • High-quality courses (even the free ones)
  • Variety of features
Main Features
  • Nanodegree programs
  • Suitable for enterprises
  • Paid Certificates of completion
edX
Pros
  • A wide range of learning programs
  • University-level courses
  • Easy to navigate
  • Verified certificates
  • Free learning track available
Main Features
  • University-level courses
  • Suitable for enterprises
  • Verified certificates of completion

Using <br>

To create a HTML line break, you should apply <br>. However, there is only one styling option for <br> element: you can add a margin attribute. It is not considered as a good practice. For setting spacing between the lines, it is better to apply line-height CSS property.

In the example below, we include HTML line breaks to properly format a postal address:

Example
<address>
  Door No.00,<br>
  Street,<br>
  City,<br>
  State,<br>
  Country.
</address>

Using <br> tag, you can create the single line break HTML document needs.

Remember: use HTML <br> tag only to include an HTML line break, not to create a new paragraph.

Browser Support

Browser image
Chrome
1+
Browser image
Edge
All
Browser image
Firefox
1+
Browser image
IE
All
Browser image
Opera
All
Browser image
Safari
All

Mobile Browser Support

Browser image
Chrome
All
Browser image
Firefox
4+
Browser image
Opera
All
Browser image
Safari
All