HTML New Line 
“Today, we will be talking about another very useful HTML element. This HTML element helps you out whenever you wish to display your text in separate lines for any good reason. Yes, you guessed it right. In this tutorial, we will be talking about the new line character of HTML and its usage.”
The New Line Character in HTML
The “
” element or tag of HTML is used as a new line character. A new line is inserted right after the insertion of this HTML element. For example, you have the sentence “Have a good day.” If you introduce the HTML “
” element after “good,” then the specified sentence will be printed as follows:
Have a good
How to Insert New Line in an HTML Script?
You can learn the insertion of a new line in an HTML script by going through the following two examples:
Example # 1: Using the New Line Character for Making the Appearance of a Verse Clear
The new line character of HTML can be used in multiple scenarios; however, its most common usage is while creating web pages intended to display poetic content such as verses, etc. In this example, we will be using the new line character in HTML to beautify the appearance of a verse, i.e., each phrase of the verse will appear in a new line. This can be done with the help of the HTML script shown below:

In this example, we have used the HTML new line character, i.e.,
, for separating each phrase of a verse for the sake of increasing its readability. After every phrase, we have made use of the
element of HTML, and we have enclosed this whole code within the paragraph tag.
Once we executed this HTML script with the Google Chrome browser, the following web page appeared on our screen. From here, you can see how nice our verse looks now.

Now, we will modify the very same script in a way that we will remove all the
tags from our HTML script while enclosing each phrase of the verse inside the paragraph tag as shown below:

The following web page depicts this modification. This is just another way of displaying the text in multiple lines; however, this method will introduce additional blank lines within your text. Therefore, if this is the kind of output that you want to get, then you are most welcome to use this method; otherwise, you should stick to the usage of the
HTML tag.

Example # 2: Using the New Line Character for Displaying Different Alphabets in Different Lines
This is just another example of using the new line character in HTML. In this example, we will be printing some English alphabet in multiple lines. The HTML script shown below displays the exact functionality as we have just explained it.

In this example, we simply wanted to have a web page that prints the first four English alphabets in one line, followed by the next four in a different line, and so on. Therefore, we have used the
tags at the intended points.
The following web page presents the specified English alphabet in the desired format:

Moreover, you can also use this HTML tag in other scenarios like printing an address in a specific format, etc.
Conclusion
This guide was designed to teach you the purpose and the usage of the new line character or the “
” tag of HTML. For this sake, after introducing you to this HTML element, we shared with you two very simple examples through which you will quickly be able to understand how the new line character can beautify the appearance of your text. It will not only make your text clear and readable, but it will also make it look more visually appealing. Therefore, you can use these two examples as a guideline for learning the usage of the new line character in HTML.
About the author
Ayesha Sajid
Ayesha Sajid has secured a Bachelor’s degree in Computer Sciences and a Master’s degree in Information Security. She is a technical content writer by profession who has around four years of experience in working with Windows and different flavors of the Linux operating system. She also has a keen interest in exploring the latest technology trends.
Источник
How To Add Blank Line In HTML

How do you add a blank line into HTML? Several ways are possible, with each unique approach depending on your specific use case and what is permissible for you to edit with the HTML.
Reasons for why you might need to insert blank lines into your HTML code could be to render it in a PDF. One recent case for myself with a project was having an area at the bottom of a letter where somebody could sign. This might be useful for example when uploading the document to Adobe Sign and having it signed by a couple of parties.
Whatever the reason or use case needed for inserting a blank line into your code, here are several means available for you to use.
I’ve broken up each section according to what is needed to be changed and these are as follows:
Let’s look at each approach in more detail.
There are three tags which are available to help insert blank lines into your code. These three tags are known as the break tag, pre-formatted tag and paragraph tags.
Let’s look at each in a little more detail.
If you’re stuck with the parent nodes that wrap your text, then one solution you can use is to append a HTML tag to include a blank line by inserting the
tag.
If a BR tag contains a forward-slash it helps the reader of the code to know the tag is self-closing . In other words, it doesn’t need a corresponding closing tag.
If you happen to write your
code without the forward-slash you need not worry about it as most browsers or HTML rendering engines will know the br tag is a tag that does not need to have a corresponding closing tag.
Personally, I prefer inserting the forward-slash purely for readability, I can quickly see from the code that the
tag is self-closing and I don’t need to go hunting around for a missing closing tag.
By inserting the br tag at the end of a line, it inserts a “break” (i.e. carriage return) and starts the text after the
tag on a new line. If an additional blank line is needed, insert another BR tag.
Here’s an example of what the code would look like using BR tags and its subsequent result in HTML:
Be careful with using the line break tag into your HTML code. You might want to check my other post on inserting line breaks in HTML about the purpose of a line break.
If you can modify the parent node wrapping the area where you want your blank lines to go, then this option may provide the most flexibility without needing to insert any additional tags .
The only issue with using the tags is that you may need to style it to fit with other formats on your page. Also, it will not allow for any other HTML tags to be used inside.
To insert a blank line using the PRE tags simply use the enter key on your keyboard and type the information for how it is to appear.
Here is an example using PRE tags and its subsequent result in HTML:
As you can see from the above example, very little is needed in the code to change. However, it does mean the tags will require their specific styling as the renderer or browser will display this quite differently from the rest of your content.
Also, you may have to add a space or two on those blank lines otherwise it may be rendered as a mistake and the blank lines may be removed.
Another way to add a blank line using HTML tags is to use the standard paragraph
tag.
If structure of your content is important and elements need to be wrapped in paragraph tags you can add a blank line by just inserting an empty paragraph section, like so:
Now you’ll notice in the above output that WordPress hasn’t rendered the blank paragraph (the line). Testing whether the above code works is important as some renderers may remove this blank paragraph thinking a mistake has been made.
Therefore, to force the blank line enter something between the paragraph tags something like a space character, or the HTML entity for the non-breaking space like so:
As you can see from the above HTML output, WordPress doesn’t deem the middle paragraph to be an oopsie and therefore renders the middle paragraph, showing an empty blank line.
Using HTML Entity / Character References
Another way of creating a blank line in your HTML output is to use HTML entities. I’ve already demonstrated one HTML entity above with the non-breaking space character but there are hundreds more.
An HTML entity is a representation of an ASCII character and is annotated by writing them with an ampersand followed by an abbreviation, like nbsp , or their ASCII ordinal number (you can read more about this fascinating topic on ordinal numbers with Python code here as the same concept applies). Finally, ensure the entity is closed off with a semi-colon.
For example, the non-breaking space character can be written as an abbreviated entity reference like or as a character reference like with both expressions being equivalent.
Since ISO-8859-1 defined the character set for the HTML 4.01 standard. Within the first 32 characters (from 0 to 31) are the control characters, several of which define a line break.
Источник