Skip to content

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

Resources

This Repo
Markdown

Code Examples with Preview

Block Elements



CodePreview
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



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

This link 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