Skip to content
All Markdown syntax

Horizontal line (rule) in Markdown

Headings and paragraphs

Markdown syntax

Works everywhere
---

Three or more dashes on their own line. Leave a blank line above it.

Put three or more dashes, asterisks or underscores on a line by themselves. Always leave a blank line above a --- rule: directly under a line of text, the dashes turn that text into a heading instead.

All ways to write it

  • ---
    Three or more dashes on their own line. Leave a blank line above it.Works everywhere
  • ***
    Three or more asterisks.Works everywhere
  • ___
    Three or more underscores.Works everywhere

Example

You type

## Summary

Two fixes and one new export option.

---

## Details

You get

Summary

Two fixes and one new export option.


Details

Questions

Why did --- turn my text into a heading?

Dashes directly under a line of text are the underline style for a level 2 heading. Add a blank line between the text and the ---, or use *** instead.

Can I use spaces between the characters?

Yes. - - - and * * * also work, as long as the line holds nothing else.

Why does --- at the top of my file disappear?

Many tools read a --- block at the very top as YAML front matter (metadata), not as a rule.

Horizontal line in Confluence

Markdown Macro+ lists horizontal rules among its supported syntax, so --- renders as a divider. On a normal Confluence page, the editor's divider element does the same job, and Markdown Exporter exports it as a horizontal rule.

Related syntax

Also in Headings and paragraphs

See all Markdown syntax