Markdown Guide
A quick reference guide to Markdown syntax, formatting, keyboard shortcuts, and common Markdown elements.
Cheat sheet
| Code | Linux / Windows | macOS | Result |
|---|---|---|---|
*Italic* | Ctrl+I | Command+I | Italic |
**Bold** | Ctrl+B | Command+B | Bold |
~~Strikethrough~~ | Alt+S | Option+S | |
# Heading 1 | Ctrl+Alt+1 | Command+Option+1 | Largest heading |
## Heading 2 | Ctrl+Alt+2 | Command+Option+2 | Second-largest heading |
[Link](http://a.com) | Ctrl+L | Command+L | Link |
 | Ctrl+Shift+I | Command+Option+I | |
A paragraph.A paragraph after 1 blank line. | — | — | Two separate paragraphs |
* List* List* List | Ctrl+U | Command+U | • List • List • List |
1. One2. Two3. Three | Ctrl+Shift+O | Command+Option+O | 1. One 2. Two 3. Three |
- [x] Done- [ ] Todo | — | — | ☑ Done ☐ Todo |
`Inline code` | Ctrl+Alt+C | Command+Option+C | Inline code |
> Blockquote | Ctrl+Q | Command+Q | See below — block elements cannot be nested in a table cell |
```pythondef whatever(foo): return foo``` | Ctrl+Alt+P | Command+Option+P | See below |
$a^2 + b^2$ | — | — | |
$$a^2 + b^2$$ alone on a line | — | — | See below — centered on its own line |
Escaped \$5 | — | — | Escaped $5 |
Blockquotes
A blockquote needs its own line — it cannot be nested inside a table cell.
Raw Code
> Markdown is intended to be as easy to read and easy to write as is feasible.Result
Markdown is intended to be as easy to read and easy to write as is feasible.
Code Blocks
Fence a block with triple backticks and name the language for syntax highlighting.
Raw Code
```python
def whatever(foo):
return foo
```Result
def whatever(foo):
return fooMath
Inline math sits within the flow of a sentence.
Inline Math
Raw Code
The Pythagorean theorem is $a^2 + b^2 = c^2$, and Euler's identity is $e^{i\pi} + 1 = 0$.Result
The Pythagorean theorem is , and Euler's identity is .
Display Math
Display math goes on its own line, wrapped in double dollar signs, and is centered.
Raw Code
$$
\int_0^\infty e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}
$$Result
Tables
Pipes separate columns, and a --- row separates the header from the body. Escape a literal pipe as \|.
Raw Code
| Left | Center | Right |
| :--- | :----: | ----: |
| `a` | `b` | `c` |
| Text | Text | Text<br><br>show the raw code then results |Result
| Left | Center | Right |
|---|---|---|
a | b | c |
| Text | Text | Text show the raw code then results |