HTML is a language that every developer starts with. If you are a newbie trying to find out how to add an empty line in HTML, we’ve you covered. In this article, we discuss the techniques that will help you to do this.

But which HTML tag should you use to insert blank lines between paragraphs? Mentioned- below are three HTML tags that can help you add a blank line in HTML:

HTML is an important programming language, and you should learn what are the 10 basic HTML tags and how many HTML tags are there to get a deeper understanding as a developer. Furthermore, we will delve deep into the abovementioned tags and understand when and how you can use these tags. 

See Also: What Are The Top 10 Basic HTML Tags?

3 Techniques to Insert an Empty Line in HTML

These are the only three ways that you will surely need to add an empty line in HTML. 

Technique 1: Use “<hr>” Tag

The <hr> tag stands for horizontal rule and can be used for this purpose. Furthermore, it’s a self-closing tag, and you will not have to think about closing the Tag while writing HTML.

hr tag in html

For example, let’s look at this code: 



<h1>This is heading 1</h1>

<p> HTML blank line</p>


<h2>This is heading 2</h2>

<p>Empty line HTML</p>


<h2>This is heading 3</h2>

<p>Blank line HTML </p>



This code will insert a horizontal rule between the paragraphs, resulting in an empty line. You can use a <hr> Tag when you want to segregate different sections or write different paragraphs. 

Technique 2: Use “<br>” Tag

Moreover, you can also use the <br> Tag to add an empty line in HTML. This Tag is used to insert line breaks among paragraphs.

br tag

For example, let’s look at this code:



<p>This is 


<br>a paragraph.


<br> with blank line in HTML.</p>



When you run this code, you can see how HTML adds a blank line when <br> Tag is used. You can use these web tags to write addresses, song lyrics, and poems. Additionally, it’s a self-closing tag. 

Technique 3: Use “<pre>” Tag

Another way of adding an empty line in HTML is utilizing the <pre> Tag. It stands for preformatted text. The font of the text is changed to Courier and has a pre-determined width that comprises line breaks and spaces.

pre element

For example, let’s look at this code:



<p>This Tag maintains both spaces and line breaks:</p>


This is some text

Which is used to 

Showcase how the pre-tag is used in HTML

To add an empty line




When you run this code, you will see how <pre> tag helps you to add blank lines in HTML. The font of the text will be changed to Courier, and there will be a line break with a fixed width. This Tag is usually used to write poems and codes on web pages.

See Also: How To Create An External Link In HTML?


How do you insert a blank line in HTML?

You can use br, hr, and pre tags to insert a blank line in HTML.

What is line spacing in HTML?

In HTML, line spacing refers to the aggregate number of spaces among lines of text in the paragraph.

How do you align text in HTML?

The text-align property can be utilized for this purpose. You can use this property to align on the left, middle, and right.

What is the HTML code for the divider line?

The hr tag can be a divider line to separate topics and paragraphs.


In conclusion, we learned about how we can add an empty line in HTML with the help of <hr>, <br>, and <pre> tags. Additionally, among these three tags, <br> and <hr> are used mainly by developers worldwide.

Also, you can also challenge yourself by creating table borders without CSS to check your knowledge of HTML. Additionally, you should know how do HTML and CSS work together to proceed to the next level as a newbie.

If you also want to learn how your code looks, then use Wix (which allows you to see your website) and figure out how to add HTML code to Wix.  

See Also: How Do HTML And CSS Work Together? Beginner’s Guide

Leave a Reply