Skip to content
FeaturesPricingBlogDownload
Home / Markdown syntax / Markdown horizontal rules

Markdown horizontal rules

A Markdown horizontal rule is a line with three or more dashes ---, asterisks *** or underscores ___ and nothing else. It renders as a thin line across the page, the HTML <hr> element. CommonMark calls it a thematic break, and every Markdown app supports it.

First section.

---

Second section.

All three of these lines produce the same rule:

---
***
___

What are the rules for a horizontal rule?

From the CommonMark spec (0.31.2, section 4.1, checked November 2026):

  • At least three of the same character: -, * or _. Mixing them, as in -*-, is not a rule.
  • Spaces between the characters are allowed, so - - - and * * * work too.
  • Up to three spaces of indentation are allowed. Four spaces make an indented code block.
  • No other characters on the line. --- end is a plain paragraph.
  • Any number of characters works, so ---------- is still one rule.

Pick one style and keep it. Most people use --- because it is quick to type and reads as a divider in plain text.

Why did my --- turn the line above into a heading?

A line of dashes directly under a paragraph is the underline style for an H2 heading, called a setext heading. GitHub, Pandoc and most renderers read it that way before they consider a rule.

Meeting notes
---

That renders as a heading "Meeting notes", not as text with a line under it. Leave a blank line above the dashes, or use ***, which never underlines a heading:

Meeting notes

---

Where else does a rule mean something different?

Two more places where a line of dashes or asterisks is read differently:

  • Line one of a file. Jekyll, Hugo, Obsidian and many other tools read a block that starts with --- on the first line as front matter, not as a rule. See front matter.
  • Lists. * * * could also be a list item, and CommonMark says the rule wins. A rule at the start of a line also ends the list above it.

Does a horizontal rule make a page break?

No. A rule is a visual divider. In Word or PDF it stays a line on the same page. Page breaks are a feature of the converter, not of Markdown, so check the tool you export with.

Where do horizontal rules work?

App or spec --- *** ___ Notes
CommonMark Yes --- under a paragraph makes an H2
GitHub Yes Same rule as CommonMark
VS Code preview Yes Same rule as CommonMark
Obsidian Yes --- on line one starts properties
Noteline Yes Drawn as a line in the editor; a line in Word and PDF

The HTML form, <hr>, also works where the renderer allows raw HTML, but the Markdown form is more portable.

Horizontal rules in Noteline

Noteline draws a rule as a thin line while you write and shows the dashes again when the cursor reaches that line. Format > Divider, Cmd+Shift+H on a Mac or Ctrl+Shift+H on Windows and Linux, inserts --- below the current line and adds a blank line first when that line has text. The blank line matters because Noteline's editor does not use underline-style headings, so --- directly under a paragraph looks like a rule in Noteline but becomes an H2 in GitHub and in Noteline's own Word, PDF and HTML export.

Common questions

How do I make a thicker or colored rule?

Markdown has no option for that. Where the renderer allows HTML styling, an <hr> with CSS can change it, but GitHub and many other renderers remove style attributes. A heading or extra space between sections is the portable alternative.

Can I put text in the middle of a horizontal rule?

No. Any text on the line stops it from being a rule. Use a heading for a labeled divider.

Is there a keyboard shortcut for a horizontal rule?

It depends on the app. Many editors have none, and you type the three dashes. In Noteline it is Cmd+Shift+H or Ctrl+Shift+H, listed with the other keyboard shortcuts.

Noteline

Download Noteline↓See pricing→

Related

  • Markdown headings
  • Markdown front matter
  • Keyboard shortcuts
  • Bold, italic and strikethrough
  • Markdown for beginners: the 15-minute guide
  • Markdown syntax

A Markdown note editor with everything you need

We’re listening

Tell us what you need or what gets in your way. If something isn’t working, write to us any time.

contact@noteline.io→

Product

  • Download
  • Pricing
  • Features
  • Changelog

Learn

  • Markdown syntax
  • Use cases
  • Blog

Compare

  • vs Obsidian
  • vs Notion

Support

  • Help
  • Support
  • Privacy
  • Terms

© 2026 Notelinecontact@noteline.io