• News
  • Contact

HTML Basics: HTML line break

html line break

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>

[email protected]

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.

Do you want to study computer science with Epitech?
Share This Post:
This { news } may also be of interest to you
The importance of learning to learn and how it can change our lives
9 de diciembre de 2022
Blockchain programming: Its main programming languages
9 de diciembre de 2022
HTML Basics: HTML line break
9 de diciembre de 2022

epitech menu

alumni

epitech on europe

epitech world

Solicita información
Le informamos que los datos anteriores se tratarán para las finalidades indicadas en el formulario y se incorporarán a un fichero personal propiedad de Epitech Barcelona. El visitante tiene reconocidos los derechos de acceso, rectificación, cancelación u oposición, tal y como indica la Ley Orgánica 15/1999 de 13 de Diciembre de LOPD y en su Real Decreto 1720 de 21/12/2007, así como en la LSSI.CE y podrá ejercitarlos a través del mail: [email protected], o en la dirección de Campus Epitech Barcelona, Calle Joan Miró, 21 Barcelona (08005).
Request for information
We inform you that the above data will be processed for the purposes indicated on the form and will be included in a personal file owned by Epitech Barcelona. The visitor has recognised rights of access, rectification, cancellation or opposition, as indicated in the Organic Law 15/1999 of 13 December of LOPD and in its Royal Decree 1720 of 21/12/2007, as well as in the LSSI.CE and may exercise them through the mail: [email protected], or at the address of Campus Epitech Barcelona, Calle Joan Miró, 21 Barcelona (08005). Translated with www.DeepL.com/Translator (free version)