The Complete Markdown Cheatsheet
A comprehensive reference for every Markdown syntax element — headings, links, tables, code blocks, and more — with live examples.
This cheatsheet covers both CommonMark (the universal standard) and GitHub Flavored Markdown (GFM) extensions, which are both fully supported in this editor.
Headings
# H1 — Page Title
## H2 — Section
### H3 — Sub-section
#### H4 — Detail
##### H5 — Fine Detail
###### H6 — Smallest
Text Formatting
| Syntax | Result |
|---|---|
**bold** or __bold__ |
bold |
*italic* or _italic_ |
italic |
***bold italic*** |
bold italic |
~~strikethrough~~ |
|
`inline code` |
inline code |
Paragraphs and Line Breaks
Separate paragraphs with a blank line. For a hard line break within a paragraph, end the line with two spaces or a backslash \.
Blockquotes
> This is a blockquote.
>
> It can span multiple paragraphs.
> Nested:
>> Second level quote.
Lists
Unordered Lists
- Item A
- Item B
- Nested item
- Another nested item
- Item C
Ordered Lists
1. First
2. Second
1. Sub-item
2. Sub-item
3. Third
Task Lists (GFM)
- [x] Completed task
- [ ] Pending task
- [ ] Another pending task
Links
[Link text](https://example.com)
[Link with title](https://example.com "Hover tooltip")
<https://auto-linked-url.com>
[Reference-style link][ref]
[ref]: https://example.com
Images


Code
Inline Code
Use `console.log()` to debug.
Fenced Code Blocks
```python
def greet(name):
return f"Hello, {name}!"
```
Supported language identifiers include python, javascript, typescript, bash, sql, json, yaml, html, css, and dozens more.
Tables (GFM)
| Column A | Column B | Column C |
|----------|:--------:|---------:|
| Left | Center | Right |
| aligned | aligned | aligned |
Colons in the separator row control alignment: left (default), :---: center, ---: right.
Horizontal Rule
---
***
___
HTML
Raw HTML is supported and passes through unchanged:
<div style="color: red;">
This is <strong>HTML</strong> inside Markdown.
</div>
Footnotes
Here is a claim that needs a citation.[^1]
[^1]: The source of this claim is *Journal of Examples*, 2024.
Math (KaTeX)
Inline math: $E = mc^2$
Block math:
$$
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$
Diagrams
Embed live diagrams using fenced code blocks with the diagram type as the language:
```mermaid
graph LR
A --> B --> C
```
Supported: mermaid, plantuml, graphviz, d2, vega-lite, katex, and more.
Escaping Characters
Prefix any special character with a backslash to render it literally:
\*Not italic\*
\# Not a heading
\[Not a link\]
Quick Reference Card
| Element | Syntax |
|---|---|
| Heading | # H1 ## H2 ### H3 |
| Bold | **text** |
| Italic | *text* |
| Strikethrough | ~~text~~ |
| Code | `code` |
| Link | [text](url) |
| Image |  |
| Blockquote | > text |
| Unordered list | - item |
| Ordered list | 1. item |
| Horizontal rule | --- |
| Table | | col | col | |
| Task list | - [x] done |
| Footnote | [^1] |
| Math (inline) | $formula$ |
| Math (block) | $$formula$$ |