Markdown cheat sheet
Every core element and its syntax on one page. For worked examples of each, see Markdown basics.
Quick reference
| Element | Syntax | Preview |
|---|---|---|
| Basic | ||
| Heading 1 | # Heading | Heading 1 |
| Heading 2 | ## Heading | Heading 2 |
| Heading 3 | ### Heading | Heading 3 |
| Heading 4 | #### Heading | Heading 4 |
| Heading 5 | ##### Heading | Heading 5 |
| Heading 6 | ###### Heading | Heading 6 |
| Line break | two trailing spaces or \ | line one line two |
| Bold | **text** | text |
| Italic | *text* | text |
| Strikethrough | ~~text~~ | |
| Ordered list | 1. item |
|
| Unordered list | - item |
|
| Image |  | 🐱 |
| Basic link | <https://url> | |
| Link text | [text](url) | |
| Reference link | [text][id] | |
| Inline code | `code` | code |
| Code block | ``` … ``` | |
| Blockquote | > quote | quote |
| Horizontal rule | --- | |
| HTML | ||
| Underline | <u>text</u> | text |
| Colour | <span style="color:red">text</span> | text |
| Comment | <!-- note --> | nothing shown |
| Image width | <img src="…" width="300"> | 🐱 |
| Accordion | <details><summary>… | Showhidden |
Colours
Common colours can be referred to by name in the
<span style="color:...">...</span> tags.
Other colours can be referenced by their HTML colour code. Click on a colour to copy the colour code to your clipboard.
Escaping & special characters
To show a character that Markdown would otherwise interpret, put a backslash before it. The following can all be escaped:
| Character | Escaped |
|---|---|
\ backslash | \\ |
` backtick | \` |
* asterisk | \* |
_ underscore | \_ |
{ left brace | \{ |
} right brace | \} |
[ left bracket | \[ |
] right bracket | \] |
| Character | Escaped |
|---|---|
( left parenthesis | \( |
) right parenthesis | \) |
# hash | \# |
+ plus | \+ |
- minus | \- |
. dot | \. |
! exclamation mark | \! |
| pipe | \| |
So \*literal asterisks\* renders as *literal asterisks* rather than italic
text.
You can also insert a character by its HTML entity, such as © for ©
and → for →.
Ready for more? See what the extensions add, or pick an editor from the apps directory.
Spotted a mistake? Let us know.