MeshWorld India LogoMeshWorld.
MarkdownTutorial5 min read

Horizontal Rules & Line Breaks in Markdown

Hinal Acharya
By Hinal Acharya
|Updated: Jul 14, 2026
Horizontal Rules & Line Breaks in Markdown

Structuring written content effectively requires proper spacing and clear section divisions. Markdown offers two primary layout elements that are often misunderstood: horizontal rules (dividers) and line breaks. This guide explains how to draw dividing lines, force single line breaks within paragraphs, and apply blank lines to manage document margins.

Key Takeaways

  • Create horizontal rules (dividers) using three or more hyphens (---), asterisks (***), or underscores (___).
  • Force a line break in a paragraph by adding two trailing spaces at the end of a line.
  • Use a trailing backslash (\) as an alternative way to force a line break.
  • Start a new paragraph by leaving a full blank line between text blocks.

How to Create Horizontal Rules in Markdown?

A horizontal rule (HTML <hr />) draws a full-width line across the page, separating major themes or chapters. To create one, place three or more hyphens ---, asterisks ***, or underscores ___ on a line by themselves.

markdown
---

***

___

Each of these three methods will compile into a clean divider:


All three markers produce identical visual separators. Hyphens --- are generally recommended because they are the easiest to read in plain text.

Leave Blank Lines Around Dividers

Always leave an empty line before and after your divider. If you place hyphens immediately below a line of text without a blank line, the Markdown parser will interpret the hyphens as an underline and turn the text above it into a heading.


How to Create a Line Break in Markdown?

In Markdown, pressing the Enter key once to move to a new line does not start a new paragraph or line in the final output. The parser treats it as a single space.

markdown
This is line one.
This is line two.

Visual output in browser: This is line one. This is line two.

To force a line break within the same paragraph, you have two simple options:

Option 1: Two Trailing Spaces

Add two spaces to the end of the line before pressing Enter.

markdown
This is line one.  
This is line two.

This is line one.
This is line two.

Option 2: Trailing Backslash

Add a backslash \ at the end of the line before pressing Enter.

markdown
This is line one.\
This is line two.

This is line one.
This is line two.


How to Create Paragraph Breaks?

To start a new paragraph (which inserts vertical spacing between the text blocks), leave a complete blank line between them. Do not use backslashes or trailing spaces to start new paragraphs.

markdown
This is the first paragraph.

This is the second paragraph.

This renders as:

This is the first paragraph.

This is the second paragraph.


What are the Common Formatting Mistakes?

Common MistakeVisual ResultHow to Fix
Writing hyphens immediately below textConverts text to H2 headingAdd a blank line before ---
Pressing Enter once inside a paragraphTreated as a spaceAdd two spaces or a backslash at the end
Mixing underscores with text on same lineItalics instead of a dividerPlace divider symbols on their own line
Use Backslashes for Modern Layouts

Using a backslash \ for line breaks is often preferred over two trailing spaces because trailing whitespace is invisible in editors and can be accidentally deleted by code formatters.


Summary Checklist

  • Use --- on a line by itself to create dividing lines.
  • Leave blank lines before and after dividers to avoid heading errors.
  • Add two spaces or a \ at the end of a line to force a line break.
  • Use an empty line to separate distinct paragraphs.
  • Avoid mixing styles to keep your raw files clean.

Frequently Asked Questions

Can I style horizontal rules in Markdown?

Markdown has no built-in design controls for dividers. The color, thickness, and margins of the line are determined by the CSS styles of your theme.

Why does my text turn bold/large above a divider?

If there is no blank line between your paragraph and the hyphens (---), the parser reads it as a Setext heading and changes the text size. Always separate dividers with blank lines.

Does a line break create a new HTML paragraph?

No. A forced line break creates a <br /> tag inside the same paragraph. A paragraph break (using an empty line) closes the current <p> tag and opens a new one.


Share_This Twitter / X
Hinal Acharya
Written By

Hinal Acharya

A BSc.IT student and a tutor for General Stream in Gujarat, India 🇮🇳. She is passionate about learning new things and food.

Enjoyed this article?

Support MeshWorld and help us create more technical content