Line break in HTML with ‘\n’

In HTML, the newline character \n is not used for line breaks. Instead, you can use the HTML tag <br> to create a line break.

For example, if you wanted to create a line break between two lines of text, you could use the following HTML code:

arduino
<p>This is the first line of text.<br>
This is the second line of text.</p>

This will display the text on two separate lines:

arduino
This is the first line of text.
This is the second line of text.

Note that you can also use the CSS property white-space: pre-line; on the containing element to preserve line breaks that are entered in the source code. For example:

arduino
<p style="white-space: pre-line;">This is the first line of text.
This is the second line of text.</p>

This will display the text on two separate lines, as if a <br> tag were used between them.