My Markdown cheat sheet

Be aware it's not an exhaustive list.

Permalink to heading Basics Basics

  • # My h1 title {#your-h1-id}
  • ## My h2 title {#your-h2-id}
  • ### My h3 title {#your-h3-id}
  • #### My h4 title {#your-h4-id}
  • ##### My h5 title {#your-h5-id}
  • ###### My h6 title {#your-h6-id}
{#-id} are optional but useful to define anchor links.
Bold **My bold text**
Italic *My italic text*
Code `My inline code`
Blockquote > my blockquote text
Image ![alt text](/path/to/image)
Link [my link text](my link URL)
ol (ordered list)
  • 1. item 1
  • 2. item 2
  • 3. item 3
ul (unordered list)
  • - item 1
  • - item 2
  • - item 3
hr ---
Strike ~text to strike~

Permalink to heading Advanced Advanced

Anchor [my link text](#myanchor)
Code block ```
package main
import "fmt"
func main() {
List of tasks (e.g. GitHub PR)
  • - [x] Optimization
  • - [ ] Bug
  • - [ ] Feature
Footnote My first footnote. [^1]

[^1]: This is my first footnote.
Table Col | Col | Col
:----- | :----: | -----:
Left | Center | Right
align | align | align

  • : controls alignments
  • - allows for separating the header from the body
  • | is a column separator.
  • Don't bother with spaces as Markdown ignores them.

Permalink to heading Mixed and nested Mixed and nested

Bold AND italic ***My bold and italic text***
Image as reference ![Dancing bird][1]
Nested blockquotes >> My nested blockquote
Nested lists
* Fruit
- Second level
+ third level
The nested part is possible thanks to the indentation and the use of different chars (*, - and +). You can even combine ol and ul.

Permalink to heading Formatting Formatting

New paragraph Use an empty line
Line break Use at least two spaces at the end of your line and type enter
Indentation in code blocks Use at least four spaces or one tabulation to indent code

Permalink to heading Flavors Flavors

Markdown flavors are variants, which means the syntax differs from one flavor to another for some elements.

It’s not uncommon to find markdown tutorials in the documentation of CMS, frameworks and platforms, and it’s often because they have a particular flavor.

You can have more detailed explanations on GitHub.

This content is available in other languages: