Horizontal Lines in Markdown
Three hyphens on a line of their own draw a horizontal line across the page: ---. This guide covers the three characters you can use, the blank line that has to come first, and front matter.
Quick answer
How do you add a horizontal line in Markdown?
Put three or more hyphens ---, asterisks *** or underscores ___ on a line of their own, with a blank line above. It becomes an <hr> element: a line across the page that separates two parts of the document.
The first part.
---
The second part.Result
The first part.
The second part.
Horizontal line syntax and examples
All forms give the same line. The only trap is the line of text right above.
Three characters, one result
Hyphens, asterisks and underscores all draw the same line.
Above
---
Between
***
Between
___
BelowResult
Above
Between
Between
Below
Spaces and longer lines
Any number of the same character from three up works, with or without spaces between them.
- - -
* * * * *
----------Result
Leave a blank line first
Right under a line of text, --- turns that text into a heading. A blank line in between keeps it a horizontal line.
This becomes a heading
---
This stays a paragraph
---Result
This stays a paragraph
The <hr> tag
Where HTML is allowed, <hr> draws the same line.
Above
<hr>
BelowResult
Above
Below
Inside quotes and lists
A horizontal line also works inside a quote or a list item.
> Part one of the quote
>
> ---
>
> Part two of the quoteResult
Part one of the quote
Part two of the quote
Front matter at the top of a file
At the very start of a file, lines between two --- are front matter: settings such as the title. Jekyll, Hugo and Obsidian hide them, and GitHub shows them as a table.
---
title: My first post
date: 2026-10-14
---
# My first postResult
Horizontal lines in popular apps
Every Markdown renderer draws the line. Chat apps and editors vary.
| App | Support | Notes |
|---|---|---|
| GitHub / GitLab | Supported | All three forms; --- at the top of a file is shown as front matter. |
| Obsidian | Supported | All three forms; --- at the top of a note starts its properties. |
| Notion | Supported | Typing --- on an empty line makes a divider block. |
| Discord / Slack | Not supported | No horizontal lines; the characters are shown as typed. |
Questions and answers
What is the difference between ---, *** and ___?
---, *** and ___?<hr>. Hyphens are the most common choice.Why did --- turn my text into a heading?
--- turn my text into a heading?---.How do I change the color or thickness of the line?
<hr style="border-top: 2px solid #999">; GitHub and many other sites remove style.What does --- at the top of a file do?
--- at the top of a file do?--- at the very start are front matter: settings such as the title, hidden from the page. GitHub shows them as a table.Does Discord support horizontal lines?
--- as typed.How do I add a divider in Notion?
--- on an empty line; Notion turns it into a divider block.How do I add a page break instead of a line?
\newpage, the command Pandoc and LaTeX users write.Does a horizontal line help screen readers?
<hr> marks a change of topic, but it does not name the new part. Use headings to give the document its structure.