An Introduction to HTML Line Breaks

An HTML line break is a point that defines the end of a current line and the start of a new line. In HTML, the <br> tag is used to create line breaks. In this HTML line breaks article, we will discuss how we can insert the line break in our HTML document with or without the <br> tag.

HTML Line Breaks

The HTML <br> tag defines a line break. Each <br> tag creates a new line. 

newline-line-break

output-line-break

Full Stack Java Developer Course

The Gateway to Master Web DevelopmentExplore Course
Full Stack Java Developer Course

How to Break a Line Without Using the <br> Tag in HTML?

You can enter a new line in your web page without using a <br> tag with one of the following alternative methods:

  • Using the <pre> Tag

The <pre> tag displays line breaks, spaces, tabs, etc. exactly as written in the HTML file. It has a fixed font (usually Courier).

pre-tag

output-pre-tag

  • Using Display: Block

This sets the display property of elements to block.

display-block-html-line-break

output-display-block

Get skilled in HTML5 and CSS3 with the Full Stack Java Developer Master's Program. Click to check out the program details! 

Conclusion

This article on HTML line breaks briefly introduced the process of inserting line breaks in an HTML document. Although we covered the basics of HTML line breaks, certification through a highly accredited online learning program is the best way to learn about web development in its entirety. Simplilearn's Full Stack Java Developer is a top choice for those looking to learn more about front-end, middleware, and back-end Java web developer technologies. Students acquire a wide range of developer skills, including how to build applications, test and deploy code, and much more. 

If you're an aspiring web and mobile developer, HTML training will broaden your skills and career opportunities. Do you have any questions for us? Please ask them in the comments section, and we'll have our experts answer them for you.

About the Author

Aryan GuptaAryan Gupta

Aryan is a tech enthusiast who likes to stay updated about trending technologies of today. He is passionate about all things technology, a keen researcher, and writes to inspire. Aside from technology, he is an active football player and a keen enthusiast of the game.

View More
  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.