Markdown New Line: How to Insert Line Breaks & Paragraphs

In Markdown, pressing Enter once does not create a new line in rendered output. To create a hard line break, end the line with two trailing spaces and press Enter, or use the HTML <br> tag. To start a new paragraph, press Enter twice.

Syntax Code Snippet
First line with two trailing spaces:  
Second line directly beneath it.

Separate paragraph with an empty line between.
Rendered HTML Output Preview

First line with two trailing spaces:
Second line directly beneath it.

Separate paragraph with an empty line between.

Platform Compatibility & Differences

GitHub (GFM):

GitHub issues and PRs automatically treat single newlines as breaks (GFM soft breaks). READMEs require two trailing spaces.

Discord Chat:

Single Enter in Discord creates a new line immediately.

Reddit:

Requires double spaces for a line break or double Enter for a paragraph.

Jupyter Notebooks:

Follows standard CommonMark (double spaces needed).

How to Use Markdown New Line

  1. Copy the ready-to-use Line Breaks syntax snippet below.
  2. Inspect the rendered live preview in both light and dark themes.
  3. Review platform compatibility differences for GitHub, Discord, Reddit, and Jupyter notebooks.
  4. Check common pitfalls and copy formatted snippets directly.

Practical Examples

Line Breaks Syntax Pattern

Markdown ignores single newlines to allow flexible source-code wrapping without altering rendered layout.

Input:
First line with two trailing spaces:  
Second line directly beneath it.

Separate paragraph with an empty line between.
Output:
Rendered visual format

Common Mistakes & Troubleshooting

  • Pressing Enter only once and wondering why words appear on the same line.
  • Trailing spaces being stripped by code editor auto-trim configurations.

Frequently Asked Questions

How do I prevent my text editor from deleting my two trailing spaces?

You can use a backslash `\` at the end of the line or write `<br>` explicitly, which code editors will never delete.