Standard Markdown Cheatsheet
This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to the reference guides located at Mardown Guide
Standard Markdown
BLOCK ELEMENTS
HEADERS
1
2
3
4
5
This is an H1
=============
This is an H2
-------------
Any number of underlining =’s or -’s will work.
1
2
3
4
5
# This is an H1
## This is an H2
###### This is an H6
BLOCKQUOTES
1
2
3
4
5
> > This is the first level of quoting.
>
> > This is nested blockquote.
>
> Back to the first level.
Blockquotes can contain other Markdown elements, including headers, lists, and code blocks:
1
2
3
4
5
6
7
8
> ## This is a header.
>
> 1. This is the first list item.
> 2. This is the second list item.
>
> Here's some example code:
>
> return shell_exec("echo $input | $markdown_script");
LISTS
1
2
3
* Red
* Green
* Blue
is equivalent to:
1
2
3
+ Red
+ Green
+ Blue
and:
1
2
3
- Red
- Green
- Blue
Ordered lists use numbers followed by periods:
1
2
3
1. Bird
2. McHale
3. Parish
CODE BLOCKS
1
2
3
This is a normal paragraph:
This is a code block.
One level of indentation — 4 spaces or 1 tab — is removed from each line of the code block. For example, this:
Here is an example of AppleScript:
1
2
3
tell application "Foo"
beep
end tell **HORIZONTAL RULES**
1
2
3
4
5
6
7
8
9
* * *
***
*****
- - -
---------------------------------------
HARD LINE BREAKS
End a line with two or more spaces:
1
2
Roses are red,
Violets are blue.
SPAN ELEMENTS
LINKS
1
2
3
4
5
This is [an example](http://example.com/ "Title") inline link.
This is [another example](http://example.com/){:target="_blank"} that opens a new tab.
[This link](http://example.net/) has no title attribute.
Here’s an example of reference links in action:
1
2
3
4
5
6
I get 10 times more traffic from [Google][] than from
[Yahoo][] or [MSN][].
[google]: http://google.com/ "Google"
[yahoo]: http://search.yahoo.com/ "Yahoo Search"
[msn]: http://search.msn.com/ "MSN Search"
EMPHASIS
1
2
3
4
5
6
7
*single asterisks*
_single underscores_
**double asterisks**
__double underscores__
CODE
1
Use the `printf()` function.
IMAGES
1
2
3
4
5
6
![Alt text](/path/to/img.jpg)
![Alt text](/path/to/img.jpg "Optional title")
![Alt text][id]
[id]: /path/to/img.jpg "Optional title"
1
Contact to <[email protected]>.
This post is licensed under
CC BY 4.0
by the author.