Markdown Cheat Sheet
A scannable Markdown cheat sheet: basic syntax + LaTeX math + Mermaid diagrams. Click "Try" on any entry to edit it live in the right-hand editor.
#Basic Syntax
Headings
# H1 ## H2 ### H3
Markdown Source
# Heading 1 ## Heading 2 ### Heading 3 #### Heading 4 ##### Heading 5 ###### Heading 6
Rendered Result
Bold
**bold**
Markdown Source
**bold text**
Rendered Result
Italic
*italic*
Markdown Source
*italic text*
Rendered Result
Strikethrough
~~strike~~
Markdown Source
~~strikethrough~~
Rendered Result
Inline code
`code`
Markdown Source
Inline `code` example.
Rendered Result
Code block
```lang ... ```
Markdown Source
```js const x = 42; console.log(x); ```
Rendered Result
Blockquote
> quote
Markdown Source
> This is a blockquote. > > It can span multiple lines and supports nesting.
Rendered Result
Ordered list
1. item
Markdown Source
1. First item 2. Second item 3. Third item
Rendered Result
Unordered list
- item
Markdown Source
- Item one - Item two - Sub-item A - Sub-item B
Rendered Result
Task list
- [ ] task
Markdown Source
- [x] Completed task - [ ] To-do A - [ ] To-do B
Rendered Result
Link
[text](url)
Markdown Source
[Markdown Cheat Sheet](https://commonmark.org)
Rendered Result
Image

Markdown Source

Rendered Result
Table
| col | col |
Markdown Source
| Col 1 | Col 2 | | --- | --- | | A | B | | C | D |
Rendered Result
Horizontal rule
---
Markdown Source
Text above --- Text below
Rendered Result
Mark highlight
==text==
Markdown Source
This is a ==highlighted== text.
Rendered Result
Footnote
[^1]
Markdown Source
This paragraph has a footnote[^1]. [^1]: This is the footnote content.
Rendered Result
#Math (LaTeX)
Inline formula
$...$
Markdown Source
The energy formula $E = mc^2$ inline.
Rendered Result
Block formula
$$...$$
Markdown Source
$$\int_0^1 x^2 \, dx = \frac{1}{3}$$Rendered Result
Fraction
\frac{a}{b}
Markdown Source
$$\frac{1}{1+x} + \frac{2x}{1-x}$$Rendered Result
Superscript / Subscript
^ _
Markdown Source
$$x^2 + y_{n+1} + a^{b^c}$$Rendered Result
Root (sqrt)
\sqrt{x}
Markdown Source
$$\sqrt{x^2+y^2} \qquad \sqrt[3]{8}$$Rendered Result
Sum / Integral
\sum \int
Markdown Source
$$\sum_{i=1}^{n} i = \frac{n(n+1)}{2} \qquad \int_0^{\pi} \sin x \, dx = 2$$Rendered Result
Matrix
\begin{matrix}
Markdown Source
$$\begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$$Rendered Result
Greek letters
\alpha \pi
Markdown Source
$$\alpha + \beta + \gamma \qquad \pi \approx 3.14 \qquad \Delta = b^2 - 4ac$$
Rendered Result
#Diagrams (Mermaid)
Flowchart
```mermaid
graph TD
```
Markdown Source
```mermaid
graph TD
A[Start] --> B{Condition}
B -->|Yes| C[Action]
B -->|No| D[End]
```Rendered Result
Sequence diagram
```mermaid
sequenceDiagram
```
Markdown Source
```mermaid
sequenceDiagram
participant User
participant System
User->>System: Send request
System-->>User: Return result
```Rendered Result
Gantt chart
```mermaid
gantt
```
Markdown Source
```mermaid
gantt
title Project Plan
dateFormat YYYY-MM-DD
section Design
Requirements analysis :done, a1, 2024-01-01, 7d
Prototype design :active, a2, after a1, 5d
section Development
Coding implementation :a3, after a2, 10d
```Rendered Result
Class diagram
```mermaid
classDiagram
```
Markdown Source
```mermaid
classDiagram
class Animal {
+String name
+eat()
}
class Dog {
+bark()
}
Animal <|-- Dog
```Rendered Result
Pie chart
```mermaid
pie
```
Markdown Source
```mermaid
pie title Browser share
"Chrome" : 65
"Safari" : 20
"Others" : 15
```Rendered Result