Updated: Markdown Writing

Written and tested by the MD Converter editorial team

Why Markdown Line Breaks Don't Show — Causes and Fixes

Learn why one Enter does not create a Markdown line break, and choose correctly between blank lines, trailing spaces, backslashes, and `<br>`.

In Markdown, "I pressed Enter but the preview shows one line" is common. That is usually not a bug—specs like CommonMark treat a single newline inside a paragraph as soft wrapping, not a hard HTML line break. Think separately about paragraphs vs line wrapping.

Why one newline becomes "one line"

Under CommonMark, one Enter inside running text often becomes a single space (or disappears) in HTML so you can reflow prose in the editor without changing paragraph boundaries—the same spirit as "paragraph breaks are blank lines." It is not Word's "what you see on screen is always a physical line." Your editor may soft-wrap visually while the file still has one long logical line.

Common misconception

People assume "HTML wraps paragraphs in <p>, so my source newlines map 1:1 to the DOM." In practice the parser first builds logical blocks (paragraphs, lists), then emits <p> / <br>. Source newlines are not guaranteed to map to DOM line breaks. If only one paste target misbehaves, it may be treating input as plain text.

Separate paragraphs (most common)

Insert a blank line between blocks for a new paragraph. Blank lines also separate many block types—get in the habit of meaningful blank lines instead of chat-style dense text.

Hard breaks inside one paragraph

For poetry, addresses, or short stacked lines where you keep one paragraph but change lines:

Trailing spaces are easy to lose—if your editor strips them on save, prefer backslash or confirm <br> policy.

Lists, tables, dialects

GFM and other flavors differ in how blank lines between list items interact with nested content. For cells, see Line breaks in Markdown tables—often <br> or row splits.

Preview and PDF

After reviewing the syntax, render the document with the implementation your team actually uses. Standardize CommonMark vs GFM across the team. PDF workflows often pass through HTML and print CSS, so if preview and print diverge, isolate paragraph versus hard-break rules first.

Use a blank line when the topic changes and a new paragraph is semantically correct. Use a hard break only when the lines belong together, such as an address, a short verse, or compact contact details. If paragraph spacing looks too large, change layout spacing rather than replacing meaningful paragraphs with <br> tags. For the CSS properties that control how lines wrap on screen, see CSS Line Wrapping: white-space, word-break, and CJK.

Trailing spaces are invisible and may be removed automatically by formatters. A backslash is easier to review in source control. Raw <br> is explicit but depends on the destination allowing HTML. Choose one team convention and test it in the same renderer used for publishing.

Summary

Markdown intentionally avoids treating a single newline as a paragraph break. Use blank lines for paragraphs; use hard-break syntax or <br> when you need in-paragraph line breaks. For shared READMEs, a one-page authoring guide cuts review debate.

FAQ

How do I get a single Enter to create a new line, like Word?

Add two trailing spaces before pressing Enter. That produces a <br> within the same paragraph. A backslash \ at the end of the line also works and is safer if your editor strips trailing spaces.

Blank lines make paragraph spacing too large

That is a CSS margin-bottom on <p> elements, not a Markdown specification issue. Adjust the output stylesheet or the converter's paragraph-spacing controls.

GitHub rendered my line breaks but another tool doesn't

GitHub Flavored Markdown (GFM) applies different rules than CommonMark. Identify which flavor each tool uses and standardize your team.

I wrote <br> but it doesn't show

The platform or tool may sanitize raw HTML tags for XSS prevention. Confirm whether raw HTML is allowed. See Using <br> in Markdown for details.

Best way to share Markdown line-break rules with a team?

Add a short section to your README: "Separate paragraphs with a blank line; use backslash or <br> for in-paragraph breaks." Link a shared preview environment so everyone can verify output quickly.

Why did a formatter remove my line break?

It may strip trailing whitespace, including the two spaces used for a Markdown hard break. Use a visible backslash or an allowed <br> tag if automatic trimming is part of the workflow.


Check line breaks in PDF