Markdown cheatsheet · Line breaks

Line breaks in markdown

The most googled markdown question, because the obvious thing doesn't work: pressing Enter once does nothing. A single newline is folded into the same paragraph.

New paragraph: a blank line

One empty line between two blocks of text makes two paragraphs, with vertical space between them. This is the break you want most of the time.

You type
First paragraph.

Second paragraph.
You get

First paragraph.

Second paragraph.

Line break without a new paragraph

For a break inside a paragraph (an address, a poem, a sign-off), end the line with two spaces, or with a backslash. The backslash has the advantage of being visible.

You type
12 rue du Marché\
75011 Paris
You get

12 rue du Marché
75011 Paris

Two trailing spaces work everywhere but you can't see them, and many editors strip trailing whitespace on save. If your line breaks keep disappearing, that's why. Prefer the backslash, or the HTML tag <br>, which is also the only option inside table cells.

Where single newlines do break

Some places deliberately treat a single Enter as a line break: GitHub issues and comments, Discord, Slack, and many note apps in their default mode. The same file can therefore wrap differently on GitHub than in a strict CommonMark renderer, which is worth knowing before you blame the editor.

Common questions

How do I add extra vertical space?

Several blank lines still collapse into one paragraph break; markdown ignores the extras. If you really need more air and HTML is allowed, insert <br> on its own lines.

Why did my two lines merge into one?

You pressed Enter once with no trailing spaces or backslash. Add the break marker, or a full blank line.

Related syntax

· All markdown guides

Less syntax. More writing.

Download maxdown

Free · no account · macOS, Windows & Linux