New line command in html

In HTML, there are a few ways to create a new line:

  1. BR Tag: The <br> tag is used to insert a line break, which will create a new line in the HTML document. It is an empty element, meaning it does not have a closing tag.

Example:

<p>This is a paragraph of text.<br>This is another line of text.</p>
  1. P Tag: The <p> tag is used to define a paragraph of text. You can use multiple <p> tags to create multiple paragraphs, each with its own line break.

Example:

<p>This is the first paragraph of text.</p>
<p>This is the second paragraph of text.</p>
  1. Line Break Entity: The &#13; entity is used to represent a line break in HTML. This is often used in situations where you need to insert a line break in a specific context, such as in a table cell or a text area.

Example:

<p>This is a paragraph of text.&#13;This is another line of text.</p>
  1. CSS: You can also use CSS to create a new line using the white-space property. For example, you can set white-space: pre to preserve the line breaks in the HTML code.

Example:

<p style="white-space: pre;">
This is a paragraph of text.
This is another line of text.
</p>

Note that the BR tag and the P tag are the most commonly used methods for creating a new line in HTML. The Line Break Entity is less commonly used, and the CSS method is often used in specific situations where more control over the layout is needed.