Add a Line Break in HTML – Tutorial
Add a Line Break in HTML: Overview
This tutorial shows you how to add a line break in HTML. By default, browsers ignore many formatting keystrokes that we take for granted. Examples include the “Enter” and “Tab” keys and multiple uses of the spacebar. To accomplish the same tasks in HTML, you use page formatting tags.
Web browsers wrap text automatically to the next line when the current line reaches the right side of the browser. When you add a line break in HTML, you avoid this text wrapping and start new text the next line. To add a line break to your HTML code, you use the <br> tag. The <br> tag does not have an end tag. You can also add additional lines between paragraphs by using the <br> tags. Each <br> tag you enter creates another blank line.
|Example:||<p>This is where your fist line of text goes
<br>Your second sentence would begin on the next line.
|Each <br> tag begins a new line.|
|Result:||This is where your first line of text goes.
Your second sentence would begin on the next line.
Add a Line Break in HTML – Tutorial: A picture of the line break tag used in HTML code.
Add a Line Break in HTML: Instructions
- To add a line break in HTML, open an HTML document to edit the HTML code.
- Then place your cursor at the place in the HTML code where you want to enter a line break.
- Then type the tag: <br>
Add a Line Break in HTML: Video Lesson
The following video lesson, titled “Adding a Line Break,” shows how to add a line break to HTML code. This video lesson is from our complete HTML5 and CSS3 training, titled “Mastering HTML5 and CSS3 Made Easy v.1.0.”