Home/Docs/Markdown Line Breaks

Markdown Line Breaks

Learn how to create line breaks and new lines in Markdown.

This guide explains soft line breaks, hard line breaks, paragraph breaks, and HTML `<br>` tags.

It also covers GitHub Markdown behavior, CommonMark compatibility, common mistakes, and best practices with practical examples.

Practice as you read: Open the Markdown Editor to try line breaks with live preview, or bookmark the Markdown Cheat Sheet for quick syntax reference.

Open EditorDownload PDF

What Are Markdown Line Breaks?

A Markdown line break moves text onto the next line without starting a new paragraph.

Many beginners expect pressing Enter once to create a visible new line. However, Markdown treats line breaks differently depending on the parser and the syntax you use.

Understanding how line breaks work is essential when writing:

  • README files
  • Documentation
  • Blog posts
  • Technical guides
  • Notes
  • GitHub repositories
  • Wikis

If you're new to Markdown overall, start with Markdown Basics. For blank-line paragraph rules, see Markdown Paragraphs.

Why Are Line Breaks Important?

Proper line breaks make your content easier to read.

They are commonly used for:

  • Addresses
  • Poetry
  • Song lyrics
  • Lists without bullets
  • Contact information
  • Documentation
  • Release notes

Without correct line breaks, multiple lines may appear as one continuous paragraph.

Types of Markdown Line Breaks

Markdown supports three common ways to create spacing:

  • Soft line breaks
  • Hard line breaks
  • Paragraph breaks

Each method behaves differently depending on the Markdown implementation.

For a quick overview of all formatting rules, see the Markdown Syntax reference and the Markdown Cheat Sheet.

Soft Line Break

A soft line break occurs when you press Enter once.

This is line one.
This is line two.

In many Markdown parsers, these lines may appear together as one paragraph.

Output

Rendered Output

This is line one. This is line two.

Soft line breaks are useful for keeping source files readable but should not be relied upon when you need a visible line break.

Hard Line Break

A hard line break forces text onto a new line.

The traditional Markdown method is to add two spaces at the end of the first line before pressing Enter.

This is line one.Β·Β·
This is line two.

(The dots represent two trailing spaces.)

Output

Rendered Output

This is line one. This is line two.

Hard line breaks are supported by GitHub Flavored Markdown and most modern Markdown processors.

Paragraph Break

To create a new paragraph, leave one blank line between blocks of text.

Deep dive: Read the complete Markdown Paragraphs guide for blank lines, spacing, and when to use paragraphs instead of line breaks.

This is the first paragraph.

This is the second paragraph.

Output

Rendered Output

This is the first paragraph.

This is the second paragraph.

Paragraph breaks are the preferred way to separate sections of content because they improve readability and follow Markdown best practices.

Using the `<br>` Tag in Markdown

Another common way to create a line break is by using the HTML <br> tag.

Most modern Markdown parsers, including GitHub Flavored Markdown, support this approach.

Deep dive: Read the complete Markdown HTML guide for supported HTML tags, GitHub restrictions, and when to use HTML instead of Markdown.

First Line<br>
Second Line

Output

Rendered Output

First Line Second Line

The <br> tag is one of the most reliable methods when you need an explicit line break across different Markdown implementations.

Multiple Line Breaks

You can create several line breaks by adding multiple <br> tags.

Line One<br>
<br>
Line Two

Output

Rendered Output

Line One

Line Two

This technique is useful for addresses, contact information, signatures, and formatted text where extra spacing improves readability.

Markdown Line Breaks on GitHub

GitHub Flavored Markdown supports multiple ways to create line breaks.

Supported methods include:

  • Two trailing spaces
  • HTML <br> tags
  • Blank lines for paragraphs

Example:

Hello World.Β·Β·
Welcome to GitHub Markdown.

This starts a new paragraph.

Line One<br>
Line Two

(The dots represent two trailing spaces.)

GitHub correctly renders all of these formatting methods, making them suitable for README files and documentation.

For GitHub-specific README workflows, see the GitHub Markdown guide.

CommonMark Line Break Behavior

CommonMark follows strict rules for rendering line breaks.

A single press of the Enter key usually creates a soft line break rather than a visible new line.

To force a visible line break, use either:

  • Two trailing spaces
  • A backslash (\)
  • The HTML <br> tag (if supported)

Understanding this behavior helps avoid formatting surprises when moving Markdown files between editors.

GitHub Flavored Markdown is based on CommonMark while adding GitHub-specific extensions for documentation and collaboration.

Line Breaks vs Paragraph Breaks

These two formatting methods are often confused.

Line Break

Moves text to the next line while keeping it within the same paragraph.

Example:

First LineΒ·Β·
Second Line

(The dots represent two trailing spaces.)

Output

Rendered Output

First Line Second Line

Paragraph Break

Creates a completely new paragraph.

Example:

First paragraph.

Second paragraph.

Output

Rendered Output

First paragraph.

Second paragraph.

For most articles, documentation, and blog posts, paragraph breaks are recommended. Use line breaks only when the content specifically requires it, such as poetry, addresses, or formatted contact information.

See Markdown Paragraphs for full paragraph formatting rules.

Best Practices

Using line breaks correctly improves readability and keeps your Markdown documents consistent across different platforms.

Use Paragraphs for Most Content

For articles, tutorials, documentation, and blog posts, use paragraph breaks instead of multiple line breaks.

Good example:

Markdown is easy to learn.

It uses a simple plain text syntax.

Paragraphs are easier to read and follow standard writing conventions.

Use Hard Line Breaks Only When Needed

Hard line breaks are useful for content where each line must appear separately.

Examples include:

  • Postal addresses
  • Contact information
  • Poetry
  • Song lyrics
  • Release notes

Avoid using hard line breaks for normal paragraphs.

Prefer <br> for Better Compatibility

If you need a guaranteed line break across multiple Markdown processors, use the HTML <br> tag.

Example:

Support Email<br>
support@example.com

Output

Rendered Output

Support Email support@example.com

This approach is reliable in GitHub, GitLab, Hugo, Docusaurus, MkDocs, and many other Markdown environments.

Preview Before Publishing

Different Markdown parsers handle line breaks slightly differently.

Always preview your document in the platform where it will be published.

Examples include:

  • GitHub
  • GitLab
  • Obsidian
  • VS Code
  • Hugo
  • MkDocs

Previewing helps catch formatting issues before your readers do. Open the Markdown Editor to verify rendering before you publish.

Keep Formatting Consistent

Choose one method for creating line breaks and use it consistently throughout your documentation.

Consistent formatting makes documents easier to maintain.

Common Markdown Line Break Mistakes

Many beginners encounter problems because Markdown treats line breaks differently from word processors.

Pressing Enter Once

Incorrect expectation:

Line One
Line Two

Many Markdown parsers treat these as part of the same paragraph.

If you need a visible new line, use a hard line break or <br>.

Forgetting the Two Trailing Spaces

Incorrect:

First Line
Second Line

Correct:

First LineΒ·Β·
Second Line

(The dots represent two trailing spaces.)

Without the trailing spaces, the line break may not render.

Using Too Many <br> Tags

Avoid excessive spacing like this:

Line One<br><br><br><br>Line Two

Instead, use proper paragraph breaks whenever possible.

Mixing Different Formatting Styles

Don't combine multiple line break techniques unnecessarily.

Instead of mixing:

  • Two trailing spaces
  • <br>
  • Blank lines

choose the method that best fits your document and use it consistently.

Real-World Examples

Using the correct line break technique ensures your content appears exactly as intended across GitHub, documentation websites, Markdown editors, and static site generators.

Address

MDConvertHub<br>
New Delhi<br>
India

Output

Rendered Output

MDConvertHub New Delhi India

Contact Information

Email: support@example.com<br>
Website: https://example.com

Output

Rendered Output

Email: support@example.com Website: https://example.com

Poetry

The sun will rise.<br>
The birds will sing.<br>
A brand new day begins.

Output

Rendered Output

The sun will rise. The birds will sing. A brand new day begins.

Release Notes

Version 2.0 Released<br>
Performance Improvements<br>
Bug Fixes<br>
New Markdown Features

Output

Rendered Output

Version 2.0 Released Performance Improvements Bug Fixes New Markdown Features

Practice Markdown Line Breaks

The best way to learn Markdown line breaks is by writing them yourself.

Open the Markdown Editor to experiment with soft line breaks, hard line breaks, <br> tags, and paragraph breaks while previewing the rendered output in real time. Keep the Markdown Cheat Sheet nearby for quick syntax lookup.

Try building a short document that includes:

  • A postal address formatted with <br> tags
  • Contact information with hard line breaks
  • A short poem or release notes list with line breaks
  • Normal paragraphs separated by blank lines
  • A preview check in the editor before publishing

Summary

Markdown line breaks help control how text is displayed across different Markdown editors and platforms.

In this guide, you learned:

  • What Markdown line breaks are
  • Soft line breaks
  • Hard line breaks
  • Paragraph breaks
  • Using the HTML <br> tag
  • GitHub Markdown behavior
  • CommonMark compatibility
  • Best practices
  • Common mistakes
  • Frequently asked questions

Understanding the difference between line breaks and paragraphs will help you write cleaner, more professional Markdown documents that render correctly on GitHub, documentation websites, note-taking apps, and other Markdown-supported platforms.

Continue Learning

Continue learning Markdown with these guides:

Available now

Coming soon

The best way to learn Markdown line breaks is by writing them yourself. Open the Markdown Editor to experiment with line break formatting while previewing the rendered output in real time.

Frequently Asked Questions

  1. 1

    How do I create a line break in Markdown?

    There are three common ways to create a line break: add two spaces at the end of a line, then press Enter; use the HTML <br> tag; or leave a blank line to start a new paragraph. The best method depends on the Markdown parser and your formatting needs.

  2. 2

    Why isn't my Markdown line break working?

    This is one of the most common Markdown questions. Possible reasons include: you only pressed Enter once, you forgot the two trailing spaces, your Markdown parser handles soft line breaks differently, or the platform doesn't support the syntax you're using. If you need a guaranteed line break, use the HTML <br> tag.

  3. 3

    What's the difference between a line break and a paragraph?

    A line break moves text to the next line while keeping it in the same paragraph. A paragraph break starts an entirely new paragraph by leaving a blank line. Most articles and documentation should use paragraph breaks instead of multiple line breaks.

  4. 4

    Does GitHub support Markdown line breaks?

    Yes. GitHub Flavored Markdown supports hard line breaks using two trailing spaces, HTML <br> tags, and blank lines for paragraphs. This makes formatting README files and documentation straightforward.

  5. 5

    Does CommonMark support line breaks?

    Yes. CommonMark supports both soft and hard line breaks. To force a visible line break, you can use two trailing spaces, a backslash (\), or HTML <br> when supported by the parser.

  6. 6

    Should I use <br> or two spaces?

    Both methods work. Use two trailing spaces if you want to follow traditional Markdown syntax. Use <br> if you need more predictable rendering across different Markdown processors.

  7. 7

    Can I use multiple line breaks?

    Yes. You can add multiple <br> tags if extra spacing is required. However, avoid excessive empty space because it can reduce readability.

  8. 8

    Which Markdown editors support line breaks?

    Most popular editors support Markdown line breaks, including GitHub, GitLab, VS Code, Obsidian, Hugo, MkDocs, Docusaurus, and Jekyll. Always preview your document before publishing.