Web Development Course:
HTML Line Break: Main Tips
<br>element adds the HTML line break when the proper line division is necessary.
<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.
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:
<address> Door No.00,<br> Street,<br> City,<br> State,<br> Country. </address>
<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.
Mobile Browser Support
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.
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!