Markdown Syntax · Troubleshooting

How Do You Make a Horizontal Line in Markdown?
And why your --- became a heading

A horizontal line in Markdown (the divider straight across the page) is three or more dashes, asterisks, or underscores on their own line: ---, ***, or ___. That is the whole rule.

The catch is that --- has a second job. Put it directly under a line of text and Markdown turns that text into a heading instead of drawing a line. Same three characters, two very different results, which is why this trips people up.

This page is about the horizontal divider and that heading trap. If your problem is a new line that will not break inside a paragraph, that is a different thing, covered in why your Markdown line breaks are not working.

How to make a horizontal line

  • Put three or more of the same character on a line by itself: ---, ***, or ___.
  • Leave a blank line above and below it.
  • All three render the same horizontal rule. There is no visual difference in the output.

If you are just getting started with these symbols, how to write Markdown covers the basics.

Why your --- turned into a heading (the Setext trap)

Markdown has two heading styles. One uses # in front. The other, called a Setext heading, underlines the text with = (for a top-level heading) or - (for a second-level heading). So this:

Some text here.
---

is not a line of text followed by a divider. Markdown reads it as one thing: the text Some text here. as a heading, underlined by the dashes. The fix is simply to separate them with a blank line.

Symptoms and fixes

What you see Why Fix
Your --- shows as a line across the page It has a blank line above and below Nothing to fix, that is correct
The text above --- became a big heading --- is directly under text, so it is read as a Setext heading underline Put a blank line between the text and the ---
You wanted a divider but nothing renders Missing blank lines, or fewer than three characters Use three or more on their own line, blank line before and after

Side by side, the correct divider and the trap look like this:

Correct divider (blank line above and below):

Some text here.

---

More text here.


The trap (--- right under text becomes a heading):

Some text here.
---

Two easy habits avoid the whole problem: always leave a blank line above your ---, or use *** for dividers, since only --- doubles as a heading underline.

See it render, live, in NoteLoom

The fastest way to catch this is to watch it render. NoteLoom is an editor that reads and writes local .md files in the browser: type your --- in the source view and the live and reading views show the result at once, so you can see whether it became a divider or a heading and adjust the blank line on the spot.

NoteLoom follows CommonMark, so what you see matches how most Markdown tools behave. To be clear about the boundaries: it has no AI, it just renders and saves your local Markdown.

How you use it: open app.noteloom.cc in Chrome / Edge / Arc, mount a local folder, and write in the source view while the live view shows the rendered page. Saved straight to your disk, no cloud, no account.

FAQ

How do you make a horizontal line in Markdown?
Put three or more dashes, asterisks, or underscores on their own line, with a blank line before and after: --- (or *** or ___). All three render the same horizontal rule, a line straight across the page.
Why did my --- turn into a heading instead of a line?
Because --- placed directly under a line of text is read as a Setext heading: the text on the line above becomes a heading, and the --- is treated as its underline, not a divider. Add a blank line between the text and the ---, or use *** instead.
What is the difference between ---, ***, and ___?
None in the output. All three make the same horizontal line. Pick whichever reads clearest to you; *** is handy when you want to avoid the heading trap, since only --- (and ===) double as a heading underline.
Do I need blank lines around a horizontal rule?
Yes. A horizontal rule needs a blank line before and after to render reliably. The blank line above is what stops --- from being read as the underline of the text above it.
Is a horizontal line the same as a line break?
No. A horizontal line is a divider drawn across the page; a line break is just starting a new line inside your text. They are different problems. For new lines that will not break, see the guide to Markdown line breaks.
Can I check this in NoteLoom?
Yes. NoteLoom renders Markdown as you type in its live and reading views, so you see right away whether your --- became a divider or a heading. It follows CommonMark, so the behavior matches most Markdown tools, and it has no AI: it just shows you the rendered result.

Watch your --- render, in a second

Open NoteLoom in Chrome / Edge / Arc, mount a local folder, and type --- in the source view while the live view shows whether it drew a divider or a heading. Saved straight back to your disk, no software to install and no account to sign up for.

Open NoteLoom and try it