How to Add a Horizontal Line in Markdown and Export a PNG
Copy a Markdown divider, fix the dashes that turn a paragraph into a heading, and export a two-part maintenance handoff as a readable PNG.
On this page
01Copy a working Markdown divider02Fix dashes that turn the previous line into a headingPut three hyphens (---) on a line by themselves. Leave a blank line above and below them. If the preceding line suddenly becomes a heading, check the blank line above the dashes first.
This maintenance handoff puts instructions for the outage above the line and instructions for recovery below it. Copy everything inside the block, including the blank lines.
# Maintenance handoff
## While the update runs
- Check the read-only status dashboard.
- Log any requests that need a reply.
---
## When service resumes
- Post the all-clear in the team channel.
- Review the handoff log before closing the update.
The PNG above was downloaded from the Markdown to Image converter using the exact source in the first block.
The sample uses one divider between two checklists. The top tells teammates where to check status and log requests. The bottom gives them two steps to take after service returns. The headings keep those instructions clear even when the image is small.
You can also put *** or ___ alone on a line. CommonMark calls all three forms a thematic break. A divider uses at least three matching characters. Six dashes and three dashes produce the same kind of element. The theme controls its appearance. CommonMark thematic break rules
Paste this short example into a Markdown preview. Update in progress becomes a level-two heading. Under an ordinary paragraph, the dashes are treated as a Setext heading underline.
Update in progress
---
The status dashboard is read-only.
Now paste this version. With a blank line above ---, CommonMark keeps the first line as a paragraph and inserts a horizontal rule between the two paragraphs. The blank line below also makes the intended boundary easy to see in the source.
Update in progress
---
The status dashboard is read-only.
Use ## Update in progress when the line is meant to be a heading. In a renderer that follows CommonMark, *** also avoids the Setext interpretation. GitHub Flavored Markdown heading rules
Start by pasting the short example with its blank lines into a new preview. If the divider appears there, compare the lines around it with the original.
- The markers appear as text. Paste three ASCII hyphens. Check for a typographic dash, mixed symbols, or extra words. Move the divider outside any fenced code block. At the document's top level, four leading spaces can create an indented code block.
- The line sits inside a list or quote. For a divider between sections, leave a blank line and bring it to the left margin. Remove the leading
>if the divider should sit outside a quote. Check where the list or quote ends in the preview. - The opening dashes disappear. In tools such as Jekyll, a valid YAML block between two
---lines at the start of the file is front matter. Keep that metadata in place and put the divider in the body, after the closing delimiter. Jekyll front matter - The preview contains a line that is hard to see. Inspect the preview if you can. When it contains an
hrelement, the parser recognized the divider. Check its contrast and spacing in the selected theme before you export. Longer markers leave the line's width to the same theme.
- Open the converter, paste the full handoff example, and switch to a view that shows the preview. Markdown to Image converter
- Check for two section headings, two list items under each one, and a single divider between the lists. Pick a theme where the divider stays visible against the background.
- Select PNG in the export settings and save the image. Open the downloaded file at the size it will appear in your team chat or slide. Look for the horizontal line, enough space around it, and the last bullet below it.
- Add a short text caption with the handoff instructions or link to the editable source when you share the image. People can still search or copy the instructions from the text.
Use the separate line-break guide if your goal is to wrap text within a paragraph. Markdown line breaks