Reference
Markdown cheat sheet
A complete Markdown cheat sheet with live examples: headings, lists, links, images, tables, task lists, footnotes, math, Mermaid diagrams, page breaks and more. Every example opens in the editor with one click.
Basic syntax
The original Markdown elements — supported by every Markdown app.
Headings
Try it# Heading 1
## Heading 2
### Heading 3Heading 1
Heading 2
Heading 3
Emphasis
Try it**Bold**, *italic* and ***both***.
Use `inline code` for code.Bold, italic and both.
Use inline code for code.
Paragraphs and line breaks
Try itFirst paragraph.
Second paragraph,\
with a line break.First paragraph.
Second paragraph,
with a line break.
Leave a blank line between paragraphs. End a line with two spaces (or a backslash) for a line break.
Links
Try it[Markdown to PDF](https://mdtopdfonline.com)
<https://example.com>Images
Try it![]()
Bulleted lists
Try it- One
- Two
- Nested
- Three- One
- Two
- Nested
- Three
Numbered lists
Try it1. First
2. Second
3. Third- First
- Second
- Third
Blockquotes
Try it> Markdown is intended to be as easy-to-read
> and easy-to-write as is feasible.Markdown is intended to be as easy-to-read and easy-to-write as is feasible.
Code blocks
Try it```python
def greet(name):
return f"Hello, {name}!"
```def greet(name):
return f"Hello, {name}!"
Add a language after the backticks for syntax highlighting.
Horizontal rule
Try itAbove
---
BelowAbove
Below
Extended syntax (GitHub-flavoured)
Widely supported extensions from GitHub Flavored Markdown and friends.
Tables
Try it| Left | Center | Right |
| :--- | :---: | ---: |
| a | b | c |
| 1 | 2 | 3 || Left | Center | Right |
|---|---|---|
| a | b | c |
| 1 | 2 | 3 |
Colons set column alignment.
Task lists
Try it- [x] Write the draft
- [ ] Review
- [ ] Export to PDFStrikethrough
Try it~~This was a mistake.~~This was a mistake.
Footnotes
Try itAlerts (callouts)
Try it> [!NOTE]
> Useful information.
> [!WARNING]
> Be careful here.NOTE
Useful information.
WARNING
Be careful here.
Highlight, subscript, superscript
Try it==Highlighted== text, H~2~O and x^2^.Highlighted text, H2O and x2.
Emoji shortcodes
Try itShip it :rocket: :tada: :white_check_mark:Ship it 🚀 🎉 ✅
Raw HTML
Try it<kbd>Ctrl</kbd> + <kbd>P</kbd>
<details>
<summary>Click to expand</summary>
Hidden content.
</details>Ctrl + P
Click to expand
Hidden content.
Safe HTML is kept; scripts are removed.
Math
LaTeX math rendered with KaTeX. Dollar signs and LaTeX-style delimiters both work.
Diagrams
Mermaid code blocks turn text into flowcharts, sequence diagrams, Gantt charts and more.
Flowchart
Try it```mermaid
flowchart LR
A[Draft] --> B{Review}
B -- OK --> C[Publish]
B -- Changes --> A
```Diagrams render live in the editor — press “Try it”.
Sequence diagram
Try it```mermaid
sequenceDiagram
Alice->>Bob: Hello!
Bob-->>Alice: Hi!
```Diagrams render live in the editor — press “Try it”.
PDF layout
Extras that control how your document is laid out when exported to PDF.
Page break
Try itEnd of chapter one.
\newpage
# Chapter twoEnd of chapter one.
Chapter two
Also: \pagebreak or <!-- pagebreak -->.
Table of contents
Try it[toc]
## Introduction
## Method
## ResultsIntroduction
Method
Results
Generated from your headings, with clickable links.
Front matter
Try it---
title: Annual Report
author: Jane Doe
date: 2026-10-02
pdf:
theme: academic
toc: true
cover: true
---
# IntroductionFront matter isn’t printed — it configures the document. Try it to see the cover page.
Sets the title, cover page details and per-document PDF settings.
Turn your Markdown into a PDF.
Everything on this page works in the free editor — with themes, page numbers and a table of contents.
Open the editor