Markdown Horizontal Line: Syntax, Dividers and Rules
To create a horizontal line (thematic break) in Markdown, place three or more hyphens (---), asterisks (***), or underscores (___) on a line by themselves surrounded by blank lines.
Section 1 content above the divider. --- Section 2 content separated by the horizontal line.
Section 1 content above the divider.
Section 2 content separated by the horizontal line.
Platform Compatibility & Differences
Supported. Always leave a blank line before `---` to avoid turning the previous line into an H2 header!
Hyphens (`---`) do NOT create a horizontal divider in Discord chat.
Supported with `---` separated by blank lines in standard Markdown.
Renders an `<hr>` element dividing notebook cells.
How to Use Markdown Horizontal Line
- Copy the ready-to-use Horizontal Line syntax snippet below.
- Inspect the rendered live preview in both light and dark themes.
- Review platform compatibility differences for GitHub, Discord, Reddit, and Jupyter notebooks.
- Check common pitfalls and copy formatted snippets directly.
Practical Examples
Horizontal Line Syntax Pattern
Horizontal rules visually divide distinct sections, chapters, or thoughts in a document.
Section 1 content above the divider. --- Section 2 content separated by the horizontal line.
Rendered visual format
Common Mistakes & Troubleshooting
- Putting `---` directly under text without a blank line, which turns the previous text into a Level 2 Heading (Setext header)!
- Using fewer than three characters.
Frequently Asked Questions
Why did my text turn huge after adding `---`?
In Markdown, hyphens directly underneath text without an empty line create a Setext Heading 2. Add an empty blank line before `---` to fix this.