← Back to notes

Markdown Guide

A quick reference guide to Markdown syntax, formatting, keyboard shortcuts, and common Markdown elements.

Cheat sheet

CodeLinux / WindowsmacOSResult
*Italic*Ctrl+ICommand+IItalic
**Bold**Ctrl+BCommand+BBold
~~Strikethrough~~Alt+SOption+SStrikethrough
# Heading 1Ctrl+Alt+1Command+Option+1Largest heading
## Heading 2Ctrl+Alt+2Command+Option+2Second-largest heading
[Link](http://a.com)Ctrl+LCommand+LLink
![Image](http://url/a.png)Ctrl+Shift+ICommand+Option+IImage
A paragraph.

A paragraph after 1 blank line.
Two separate paragraphs
* List
* List
* List
Ctrl+UCommand+U• List
• List
• List
1. One
2. Two
3. Three
Ctrl+Shift+OCommand+Option+O1. One
2. Two
3. Three
- [x] Done
- [ ] Todo
☑ Done
☐ Todo
`Inline code`Ctrl+Alt+CCommand+Option+CInline code
> BlockquoteCtrl+QCommand+QSee below — block elements cannot be nested in a table cell
```python
def whatever(foo):
return foo
```
Ctrl+Alt+PCommand+Option+PSee below
$a^2 + b^2$a2+b2a^2 + b^2
$$a^2 + b^2$$ alone on a lineSee below — centered on its own line
Escaped \$5Escaped $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 foo

Math

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 a2+b2=c2a^2 + b^2 = c^2, and Euler's identity is eiπ+1=0e^{i\pi} + 1 = 0.

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

0ex2dx=π2\int_0^\infty e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}

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

LeftCenterRight
abc
TextTextText

show the raw code then results