Markdown cheat sheet

Every core element and its syntax on one page. For worked examples of each, see Markdown basics.

Quick reference

ElementSyntaxPreview
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 breaktwo trailing spaces or \
line one
line two
Bold**text**
text
Italic*text*
text
Strikethrough~~text~~
text
Ordered list1. item
  1. item
Unordered list- item
  • item
Image![alt](url)
🐱
Basic link<https://url>
Link text[text](url)
Reference link[text][id]
Inline code`code`
code
Code block``` … ```
code
Blockquote> quote
quote
Horizontal rule---

Advanced
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.

red
maroon
orange
gold
yellow
olive
lime
green
teal
aqua
blue
navy
purple
magenta
pink
brown
black
gray
silver
white

Other colours can be referenced by their HTML colour code. Click on a colour to copy the colour code to your clipboard.

#000
#030
#060
#090
#0c0
#0f0
#300
#330
#360
#390
#3c0
#3f0
#600
#630
#660
#690
#6c0
#6f0
#900
#930
#960
#990
#9c0
#9f0
#c00
#c30
#c60
#c90
#cc0
#cf0
#f00
#f30
#f60
#f90
#fc0
#ff0
#003
#033
#063
#093
#0c3
#0f3
#303
#333
#363
#393
#3c3
#3f3
#603
#633
#663
#693
#6c3
#6f3
#903
#933
#963
#993
#9c3
#9f3
#c03
#c33
#c63
#c93
#cc3
#cf3
#f03
#f33
#f63
#f93
#fc3
#ff3
#006
#036
#066
#096
#0c6
#0f6
#306
#336
#366
#396
#3c6
#3f6
#606
#636
#666
#696
#6c6
#6f6
#906
#936
#966
#996
#9c6
#9f6
#c06
#c36
#c66
#c96
#cc6
#cf6
#f06
#f36
#f66
#f96
#fc6
#ff6
#009
#039
#069
#099
#0c9
#0f9
#309
#339
#369
#399
#3c9
#3f9
#609
#639
#669
#699
#6c9
#6f9
#909
#939
#969
#999
#9c9
#9f9
#c09
#c39
#c69
#c99
#cc9
#cf9
#f09
#f39
#f69
#f99
#fc9
#ff9
#00c
#03c
#06c
#09c
#0cc
#0fc
#30c
#33c
#36c
#39c
#3cc
#3fc
#60c
#63c
#66c
#69c
#6cc
#6fc
#90c
#93c
#96c
#99c
#9cc
#9fc
#c0c
#c3c
#c6c
#c9c
#ccc
#cfc
#f0c
#f3c
#f6c
#f9c
#fcc
#ffc
#00f
#03f
#06f
#09f
#0cf
#0ff
#30f
#33f
#36f
#39f
#3cf
#3ff
#60f
#63f
#66f
#69f
#6cf
#6ff
#90f
#93f
#96f
#99f
#9cf
#9ff
#c0f
#c3f
#c6f
#c9f
#ccf
#cff
#f0f
#f3f
#f6f
#f9f
#fcf
#fff

Escaping & special characters

To show a character that Markdown would otherwise interpret, put a backslash before it. The following can all be escaped:

CharacterEscaped
\ backslash\\
` backtick\`
* asterisk\*
_ underscore\_
{ left brace\{
} right brace\}
[ left bracket\[
] right bracket\]
CharacterEscaped
( 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 &copy; for © and &rarr; for →.

Ready for more? See what the extensions add, or pick an editor from the tools directory.