You pressed Enter, the two lines became one paragraph, and nothing looks the way you typed it. This is the first thing that surprises everyone about Markdown, and it is deliberate: a single newline in the source is treated as a plain space, so you can wrap long paragraphs in your editor without changing the output.

There are three ways to get the break you wanted. Edit the panel below and watch which is which.

Line breaks, three ways
Markdown
This line and this one
end up in the same paragraph.

A blank line above starts a new paragraph.

Two spaces at the end of a line  
force a break inside the same paragraph.

A backslash works too\
and is easier to see.
Preview

This line and this one end up in the same paragraph.

A blank line above starts a new paragraph.

Two spaces at the end of a line
force a break inside the same paragraph.

A backslash works too
and is easier to see.

The rule behind it

Markdown has two different concepts, and mixing them up is what causes the confusion:

  • A paragraph break puts a gap between two blocks of text. It renders as two separate <p> elements. You get it with a blank line.
  • A line break moves to the next line inside the same paragraph. It renders as a <br>. You get it with two trailing spaces or a backslash.

Most of the time you want a paragraph break, and a blank line is all it takes.

The problem with two spaces

Two spaces at the end of a line is the original syntax, and it works nearly everywhere — but it is invisible. You cannot see it while writing, most editors strip trailing whitespace when they save, and a code review will never show it to you. A file that renders correctly on your machine can quietly stop working after someone else opens it.

The backslash is newer, part of CommonMark, and visible in the source. If your editor and target both support CommonMark — most modern ones do — prefer it. If you are writing for something old or unusual, use two spaces and turn off “trim trailing whitespace” in your editor.

Markdown
Roses are red  
Violets are blue

Roses are red\
Violets are blue
Preview

Roses are red
Violets are blue

Roses are red
Violets are blue

Both render identically. Only one of them survives a save.

Where line breaks matter most

Addresses, poetry, song lyrics and signatures are the cases where the difference is visible and a paragraph break would be wrong:

Markdown
Carlo Di Giuseppe\
AppJuice\
Italy
Preview

Carlo Di Giuseppe
AppJuice
Italy

Without the breaks that becomes one run-on line. With a blank line between each it becomes three paragraphs, spaced too far apart.

Common mistakes

Pressing Enter twice inside a list. A blank line between list items turns a tight list into a loose one — every item gets wrapped in a <p> and the spacing grows. That is a real feature, but it surprises people. See the guide to lists.

Trailing spaces removed on save. Check your editor’s settings. This is the single most common reason a Markdown file renders differently for someone else.

Using <br> directly. It works in most renderers, because they allow raw HTML. But it stops your document from being portable — the whole point of Markdown — and it will render as literal text anywhere HTML is disabled.

Expecting a blank line to add extra space. Three blank lines produce the same result as one. Markdown collapses them. If you need vertical space, that is a styling decision, not a content one.

FAQ

Why does Markdown ignore my single line break?

By design. Markdown treats a single newline as a space so that you can wrap long paragraphs across several lines in your source file without breaking them in the output. To force a break, end the line with two spaces or a backslash; to start a new paragraph, leave a blank line.

What is the difference between two spaces and a backslash in Markdown?

They produce exactly the same result, a <br> inside the current paragraph. Two spaces are the original 2004 syntax and are supported almost everywhere but invisible in the source; the backslash was added by CommonMark, is visible, and survives editors that trim trailing whitespace.

Does GitHub handle line breaks differently?

Yes, in some places. In issues, pull requests and comments, GitHub renders a single newline as a real line break, so pressing Enter once does what you expect. In .md files in a repository it follows the standard rule and joins the lines. This is why the same text behaves differently in a README and in a comment.

How do I add a blank line between paragraphs in Markdown?

One blank line is enough — Markdown collapses any number of consecutive blank lines into a single paragraph break. To create visible extra space you would need HTML or CSS, which is a formatting concern rather than something Markdown expresses.

Can I write a paragraph on one long line?

Yes, and many people do. Because single newlines are treated as spaces, whether you write a paragraph as one very long line or wrap it at 80 characters makes no difference to the output. Pick whichever is easier to edit and stay consistent.