Reference
Markdown cheat sheet
A compact reference for the Markdown you are most likely to use in a document. Copy a pattern, paste it into the editor and check the paginated preview.
Updated November 23, 2026 · Markdown2PDF by Hyperdyn
Headings and paragraphs
| Markdown | Result |
|---|---|
# Heading 1 | A top-level heading |
## Heading 2 | A section heading |
### Heading 3 | A subsection heading |
| Blank line between blocks | A new paragraph |
Leave a blank line between block elements. Markdown treats a single line break as a space in most rendered contexts.
Emphasis, links and inline code
| Markdown | Result |
|---|---|
**strong** | strong |
*emphasis* | emphasis |
[label](https://example.com) | A link |
`inline code` | Inline code |
~~struck~~ | Struck-through text where supported |
Lists and task lists
- First item
- Second item
- Nested item
1. First step
2. Second step
- [x] Completed task
- [ ] Open taskTask lists render as disabled checkboxes in the document. They are useful for runbooks, checklists and review notes. Keep list items short enough to avoid awkward page breaks.
Tables
| System | Owner | Status |
| --- | --- | --- |
| API | Platform | Ready |
| Database | Data | Testing |Tables are excellent for comparisons but can be the first thing to break when a page is narrow. Check the preview after changing margins or page size. Markdown2PDF keeps table rows together where possible.
Code blocks
Use three backticks around a block and name the language for highlighting:
```ts
const pages = planPages(document);
console.log(pages.length);
```Inline code uses single backticks. Long code lines are wrapped or truncated by the document styles; keep lines reasonably short for the cleanest print output.
Images and blockquotes

> A quotation or important note.Alt text matters for accessibility and for the case where an image cannot load. Remote images must be reachable from your browser; a blocked or cross-origin image may not appear in the PDF.
Page breaks in Markdown2PDF
Force a new page with an HTML comment on its own line:
<!-- pagebreak -->This is a Markdown2PDF extension for paginated output, not standard Markdown. Use it when a major section must begin on a fresh sheet. Read the page-break documentation for details.
Markdown flavours and extensions
Markdown has a small common core and many extensions. Markdown2PDF targets the common authoring features plus tables, task lists and fenced code blocks. That covers most README, documentation and note-taking workflows.
Features from other ecosystems may need conversion first: wiki links such as [[note]], front matter, directives, footnotes and embedded databases are not resolved into a page layout. If your source relies on them, export or copy the rendered Markdown instead.
Frequently asked questions
What is a .md file?
A .md file is a plain-text file containing Markdown. It can be opened in any text editor and rendered by a Markdown previewer or converter.
Is Markdown the same as CommonMark?
CommonMark is a precise specification for Markdown. Many tools add extensions such as tables and task lists. Markdown2PDF supports the common authoring features plus the GitHub-style features used in technical documents.
How do I add a page break?
Put <!-- pagebreak --> on its own line. The preview shows a forced-break badge and the PDF starts a new page there.
Can I convert text to Markdown here?
No. Markdown2PDF edits and renders Markdown; it does not turn arbitrary text or HTML into Markdown syntax. You can paste existing Markdown and format it in the editor.