Skip to content
Epitech

HTML Basics: HTML line break

Published on 1 min readBy Epitech Spain

An line break in HTML is made by using the <br> or <br/>tag. This is used to introduce a html new line in the text, similar to using the “Enter” key on the keyboard. 

They are generally used within paragraphs and are very useful when writing addresses or any other texts where line separation is important. 

However, it’s not necessary to introduce line breaks in between paragraphs, since using the <p> tag does this. On the other hand, neither is it necessary to use them to increase the size of the line break in HTML. To do this, it’s better to change the CSS margin of the document. 

HTML line break features

  • A closing tag isn’t necessary. The only vital thing is adding the <br> tag at the end of the line where you want a break. In other words, it’s an empty element.
  • In XHTML it’s written as <br/>
  • Line break tags come under the “phrasing content” category, which in turn is a subset of the “flow content” category.
  • They enable any element that accepts “phrasing content” as a parent element.
  • The <br> tag includes global attributes. However, from HTML 4.01 onwards, the lang and dir attributes aren’t compatible with it. 

An example of how to make an HTML line break

Epitech Barcelona Campus<br>

Address: C/ Joan Miró, 21 Barcelona (08005)<br>

Tel: + (34) 93 797 88 14<br>

Email:<br>

barcelona@epitech.eu

As you can see, line space tags in HTML are very useful and easy to introduce. If you want to learn more, don’t hesitate to study at EPITECH. We offer a Bachelor + Master’s Degree in Computer Science where you’ll learn all about programming languages.

  • Communication skills and their importance at every educational level

    What do you understand by communication skills? To talk about the communication skills of a person means their ability to express their ideas clearly to others; their ability to make another person understand what they are saying. Effective communication skills are crucial for any situation we find

    Read more
  • Databases: Uses, database applications and types of databases

    When a business starts up, it’s normal for them to store their data in programme files in unformatted text, for example on Excel sheets, rather than using a database. As time goes by, they will generate a huge amount of different types of data, such as financial, inventory, or personal. In these cas

    Read more
  • Blockchain programming: Its main programming languages

    Are you curious about the sudden appearance and huge popularity of Blockchain? Let’s talk about blockchain programming. What are we talking about? Basically, Blockchain is a chain of blocks, as its name would suggest. But, in a digital context, these blocks are information which are connected throug

    Read more

Ready to join Epitech?

Start your application today or talk to our admissions team about any questions you have.