Main Tips On HTML Line Break - BitDegree

🚨 $100K in Sight: Follow Bitcoin’s Final Push Live! TRACK NOW

Code has been added to clipboard!

Home| HTML | HTML Tags| <br> HTML Line Break Reading time 1 min Published Mar 19, 2019 Updated Oct 1, 2019

Contents

  • 1. HTML Line Break: Main Tips
  • 2. Using <br>
  • 3. Browser Support

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
GET 25% OFF 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
UP TO 70% OFF 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
FREE COURSES

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 Copy <address> Door No.00,<br> Street,<br> City,<br> State,<br> Country. </address> Try it Live Learn on Udacity

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 Previous Topic Next Topic
HTML
Basics Introduction Syntax Editors Basic Examples Head Section <!DOCTYPE> Tags and Elements Semantic Elements Tags Reference Attributes Comments Block and Inline Elements Forms Form Elements Input Responsive Web Design Inline Scripts Uniform Resource Locator Redirect XHTML Geolocation Drag and Drop Local Storage Web Workers Server-Sent Events
HTML for Text Formatting
Character Encoding Text Formatting Quotation and Citation Elements Headings Paragraphs Links Tables Lists Symbols Space Tab Styles Computer Code
HTML Visuals and Media
Layout Classes Colors Images iframes Audio Player Video Player YouTube Videos Multimedia Canvas SVG
HTML Tags
<!-- --> <a> <abbr> <acronym> DEPRECATED <address> <applet> DEPRECATED <article> <aside> <audio> <b> <base> <basefont> DEPRECATED <bdi> <bdo> <big> DEPRECATED <blink> DEPRECATED <blockquote> <body> <br> <button> <canvas> <caption> <center> DEPRECATED <cite> <code> <col> <colgroup> <datalist> <dd> <del> <details> <dfn> <dialog> <dir> DEPRECATED <div> <dl> <dt> <em> <embed> <fieldset> <figcaption> <figure> <font> DEPRECATED <footer> <form> <frame> DEPRECATED <frameset> DEPRECATED <h1> – <h6> <head> <header> <hr> <html> <i> <iframe> <img> <input> <ins> <kbd> <keygen> DEPRECATED <label> <legend> <li> <link> <main> <map> <mark> <menu> <menuitem> DEPRECATED <meta> <meter> <nav> <noframes> DEPRECATED <noscript> <object> <ol> <optgroup> <option> <output> <p> <param> <pre> <progress> <q> <rp> <rt> <ruby> <s> <samp> <script> <section> <select> <small> <source> <span> <strike> DEPRECATED <strong> <style> <sub> <summary> <sup> <table> <tbody> <td> <tfoot> <th> <thead> <time> <title> <tr> <track> <tt> DEPRECATED <u> <ul> <var> <video> <wbr>
Best-rated MOOCs to Learn Programming:
DataCamp Review 9.8 Read review Udacity Review 9.6 Read review edX Review 9.4 Read review

Related Posts

CSS Text: Learn to Set Colors, Spacing, Direction and Alignment

Learn to change CSS text attributes easily. Follow this CSS text tutorial and examples to learn basics of CSS text style and cool CSS text tricks.

6 min read 14 examples
HTML5 Tags List: Get to Know the Most Useful Elements

Find HTML5 tags explained and illustrated with beginner-friendly HTML5 examples. Grasp the difference between HTML5 tags & elements and learn to use both!

8 min read 35 examples
Adding HTML Space: Options and Examples

HTML space can be added in a few ways. Unsure how to add space in HTML? Read this HTML space tutorial & get to know your options for HTML blank space!

4 min read 4 examples

Related Code Examples

HTML

Optimum in HTML meter

HTML

Deprecated valign Attribute in HTML tfoot

HTML

Default Value in HTML input

HTML

Deprecated compact Attribute in HTML ul

HTML

HTML Bold Text

HTML

Styling HTML pre Tag EXCLUSIVE OFFER: GET 25% OFF

EXCLUSIVE OFFER: GET 25% OFF

Save Big With DataCamp Promo Code Days Hours Minutes Seconds GET 25% OFF

Từ khóa » Html Br Options