DEV Community

Geoff
Geoff

Posted on

Markdown Cheatsheet

A large collection of code samples which have been tested against GitHub's markdown parser... so you don't have to.

Code Examples with Preview

Block Elements

Code Preview
Paragraph
This is a paragraph.
This is a paragraph.
Headers (Sextext-style)
Header 1
========

Header 2
--------

Header 1

Header 2

Headers (Atx-style)
# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6

Header 1

Header 2

Header 3

Header 4

Header 5
Header 6
Headers (Atx-style closed)
# Header 1 #
## Header 2 ##
### Header 3 ###
#### Header 4 ####
##### Header 5 #####
###### Header 6 #####

Header 1

Header 2

Header 3

Header 4

Header 5
Header 6
Blockquote
> Lorem ipsum dolor sit amet [...]
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
Blockquote with nested elements
> ## This is a header.
> 1. This is the first list item.
> 2. This is the second list item.
>
> Here's some example code:
>
>     Markdown.generate();

This is a header.

  1. This is the first list item.
  2. This is the second list item.

Here's some example code:

Markdown.generate();
List
- Red
- Green
- Blue
+ Red
+ Green
+ Blue
* Red
* Green
* Blue
  • Red
  • Green
  • Blue
Ordered List
1. Buy flour and salt
1. Mix together with water
1. Bake
  1. Buy flour and salt
  2. Mix together with water
  3. Bake
Code Block
Normal paragraph.
    Code

Normal paragraph.

Code
Horizontal Rules
* * *

***

*****

- - -

---------------------------------------





Inline Elements

Code Preview
Links
This is [an example](http://example.com "Example") link.

[This link](http://example.com) has no title attr.

This is [an example] [id] reference-style link.

[id]: http://example.com "Optional Title"

This is an example link.

This link has no title attr.

This is an example reference-style link.

Emphasis
*single asterisks*

_single underscores_

**double asterisks**

__double underscores__

single asterisks

single underscores

double asterisks

double underscores

Code
This paragraph has some `code` in it.

This paragraph has some code in it.

Image
![Alt Text](https://get.svg.workers.dev/?s=64&f=gray "Image Title")

Alt Text

if you want to add static website forms
to your website I recommend you look at https://fabform.io

Top comments (0)