How to create a new line in a p tag of HTML

Updated: 04/02/2019 by Computer Hope
HTML break tag

When writing a paragraph tag (<p>), especially in a WYSIWYG HTML editor, pressing the Enter key creates a new paragraph and not a new line. To create a new line in an HTML paragraph tag, follow the steps below depending on how you are writing the HTML.

Creating a new line in HTML code

If you are writing the HTML, you can create a new line by using the <br> (break) tag, as shown in the example below.

Example code

<p>Example of <br>text that is using<br>the &lt;br&gt; tag to break<br>a paragraph.</p>

Example code output

Example of
text that is using
the <br> tag to break
a paragraph.

Creating a new line in WYSIWYG editor

A new line can also be created in WYSIWYG editors such as an online editor used in a CMS program like WordPress or an HTML editor like Dreamweaver with a keyboard shortcut. Most programs and online forms support the Shift key + Enter keyboard shortcut. To use this shortcut, move to the text cursor to where you want the new line to begin. Then, press and hold the Shift key, and press the Enter key.


If this keyboard shortcut does not work, it is likely only possible to enter a new line by manually inserting a line break ("<br>" tag) in the document's HTML code.

Additional information