Post

Markdown Cheat Sheet

Quick reference guide that lists commonly used Markdown syntax and examples.

Markdown Cheat Sheet

Check out the official documentation on GitHub to learn more about writing and formatting syntax. Additionally, you can read the latest updates in the changelogs.

Introduction

Markdown is a plain text formatting syntax designed for creating rich-text content with ease. It serves as both a method for writing formatted text and a tool for converting plain text into HTML.

  • 2004: John Gruber developed Markdown.
  • 2014: CommonMark was established as a standard specification for Markdown to resolve inconsistencies and ambiguities in Markdown implementations. This initiative was spearheaded by John MacFarlane and backed by other Markdown enthusiasts to ensure a reliable and consistent specification.

Headings

Heading 1

Heading 2

Heading 3

Heading 4

1
2
3
4
5
6
7
# Heading 1

## Heading 2

### Heading 3

#### Heading 4

Text styles

Normal

The quick brown fox jumps over the lazy dog.

1
The quick brown fox jumps over the lazy dog.

Bold

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

1
2
3
**The quick brown fox jumps over the lazy dog.**

__The quick brown fox jumps over the lazy dog.__

Italic

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

1
2
3
*The quick brown fox jumps over the lazy dog.*

_The quick brown fox jumps over the lazy dog._

Bold and Italic

The quick brown fox jumps over the lazy dog.

1
**_The quick brown fox jumps over the lazy dog._**

Blockquotes

The quick brown fox jumps over the lazy dog.


The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.


The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog.


The quick brown fox jumps over the lazy dog.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
> The quick brown fox jumps over the lazy dog.

<br>

> The quick brown fox jumps over the lazy dog.
>
> The quick brown fox jumps over the lazy dog.
>
> The quick brown fox jumps over the lazy dog.

<br>

> The quick brown fox jumps over the lazy dog.
>> The quick brown fox jumps over the lazy dog.
>>> The quick brown fox jumps over the lazy dog.

<br>

> **The quick brown fox** *jumps over the lazy dog.*

Monospaced

The quick brown fox jumps over the lazy dog.

1
<samp>The quick brown fox jumps over the lazy dog.</samp>

Underlined

The quick brown fox jumps over the lazy dog.

1
<ins>The quick brown fox jumps over the lazy dog.</ins>

Strike-through

The quick brown fox jumps over the lazy dog.

1
~~The quick brown fox jumps over the lazy dog.~~


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
1
2
3
4
5
6
<pre>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. <strike>Sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua.</strike> Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <strike>Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</strike>
</pre>

Subscript

log2(x)

Subscript The quick brown fox jumps over the lazy dog.

1
2
3
log<sub>2</sub>(x)

Subscript <sub>The quick brown fox jumps over the lazy dog.</sub>

Superscript

2 53-1 and -2 53-1

Superscript The quick brown fox jumps over the lazy dog.

1
2
3
2 <sup>53-1</sup> and -2 <sup>53-1</sup>

Superscript <sup>The quick brown fox jumps over the lazy dog.</sup>

Text Color

MathJax syntax: mathjax color

Multiline

The quick
brown fox
jumps over
the lazy dog.

1
2
3
4
The quick\
brown fox\
jumps over\
the lazy dog.

Tables

DefaultLeft alignCenter alignRight align
9999999999999999999999999999999999999999
999999999999999999999999999999999999
99999999999999999999999999999999
9999999999999999999999999999
DefaultLeft alignCenter alignRight align
9999999999999999999999999999999999999999
999999999999999999999999999999999999
99999999999999999999999999999999
9999999999999999999999999999
1
2
3
4
5
6
7
8
9
10
11
12
13
| Default | Left align | Center align | Right align |
| - | :- | :-: | -: |
| 9999999999 | 9999999999 | 9999999999 | 9999999999 |
| 999999999 | 999999999 | 999999999 | 999999999 |
| 99999999 | 99999999 | 99999999 | 99999999 |
| 9999999 | 9999999 | 9999999 | 9999999 |

| Default    | Left align | Center align | Right align |
| ---------- | :--------- | :----------: | ----------: |
| 9999999999 | 9999999999 | 9999999999   | 9999999999  |
| 999999999  | 999999999  | 999999999    | 999999999   |
| 99999999   | 99999999   | 99999999     | 99999999    |
| 9999999    | 9999999    | 9999999      | 9999999     |

Inline

Markdown cheat sheet

1
[Markdown cheat sheet](https://carvychen.github.io/posts/markdown_cheat_sheet/)

Reference

Markdown cheat sheet

Markdown cheat sheet

Reference text

1
2
3
4
5
6
7
8
[Markdown cheat sheet][Reference text]

[Markdown cheat sheet][1]

[Reference text]

[Reference text]: https://carvychen.github.io/posts/markdown_cheat_sheet/
[1]: https://carvychen.github.io/posts/markdown_cheat_sheet/

Footnote

Footnote.1

Some other important footnote.2

1
2
3
4
5
6
Footnote.[^1]

Some other important footnote.[^2]

[^1]: This is footnote number one.
[^2]: Here is the second footnote.

Relative

Example of a relative link

1
[Example of a relative link](relative.md)

Hover

You can use BinaryTree to create markdown tables.

1
You can use [BinaryTree](https://binarytree.dev/ "Array of Developer Productivity Tools Designed to Help You Save Time") to create markdown tables.

Enclosed

https://github.com/

1
<https://github.com/>

Images

alt text: optional
Title text: optional

alt text

1
![alt text](https://cdn.jsdelivr.net/gh/carvychen/asset-data/images/avatar.png "Title text")


alt text

1
2
3
![alt text][image]

[image]: https://cdn.jsdelivr.net/gh/carvychen/asset-data/images/avatar.png "Title text"


alt text

1
![alt text](https://media.giphy.com/media/qLHzYjlA2FW8g/giphy.gif)

Badges

GitHub stars

GitHub forks

GitHub issues

GitHub last commit

GitHub license

1
2
3
4
5
6
7
8
9
![GitHub stars](https://img.shields.io/github/stars/cotes2020/chirpy-starter?style=style-flat-green)

![GitHub forks](https://img.shields.io/github/forks/cotes2020/chirpy-starter?style=style-social-green) 

![GitHub issues](https://img.shields.io/github/issues/cotes2020/chirpy-starter?style=style-for--the--badge-green) 

![GitHub last commit](https://img.shields.io/github/last-commit/cotes2020/chirpy-starter?style=style-plastic-green) 

![GitHub license](https://img.shields.io/github/license/cotes2020/chirpy-starter?style=for-the-badge)

Lists

Ordered

  1. One
  2. Two
  3. Three
1
2
3
1. One
2. Two
3. Three

Unordered

  • First level
    • Second level
      • Third level
        • Fourth level
  • First level
    • Second level
  • First level
    • Second level
1
2
3
4
5
6
7
8
- First level
  - Second level
    - Third level
      - Fourth level
- First level
  - Second level
- First level
  - Second level

Task

  • Fix Bug 223
  • Add Feature 33
  • Add unit tests
1
2
3
- [x] Fix Bug 223
- [ ] Add Feature 33
- [ ] Add unit tests

Buttons

cmd + shift + p

1
<kbd>cmd + shift + p</kbd>

markdown cheat sheet

1
[<kbd>markdown cheat sheet</kbd>](https://carvychen.github.io/posts/markdown_cheat_sheet/)

Collapsible items

Markdown - [Markdown Editor](https://binarytree.dev/me) - [Table Of Content](https://binarytree.dev/toc) - [Markdown Table Generator](https://binarytree.dev/md_table_generator)
1
2
3
4
5
6
7
8
<details>
  <summary>Markdown</summary>

- <kbd>[Markdown Editor](https://binarytree.dev/me)</kbd>
- <kbd>[Table Of Content](https://binarytree.dev/toc)</kbd>
- <kbd>[Markdown Table Generator](https://binarytree.dev/md_table_generator)</kbd>

</details>

Horizontal Rule




1
2
3
---
***
___

Diagrams

pie
"Movies" : 80
"TV shows" : 20
1
2
3
4
5
```mermaid
pie
"Movies" : 80
"TV shows" : 20
```

Mathematics

Check out the official documentation on GitHub to learn more about writing and formatting MathJax syntax.

This is an inline math expression $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$

1
This is an inline math expression $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$


\[x = {-b \pm \sqrt{b^2-4ac} \over 2a}\]
1
2
3
$$
x = {-b \pm \sqrt{b^2-4ac} \over 2a}
$$

Miscellaneous

Comments

1
2
3
<!--
Lorem ipsum dolor sit amet
-->

Emojis

Complete list of github emoji

Line break

You can use <br> to insert a single line break.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sed do eiusmod tempor incididunt ut labore et dolore magna.

1
Lorem ipsum dolor sit amet, consectetur adipiscing elit. <br> Sed do eiusmod tempor incididunt ut labore et dolore magna.
  1. This is footnote number one. ↩︎

  2. Here is the second footnote. ↩︎

This post is licensed under CC BY 4.0 by the author.