Markdown syntax guide
Every piece of Markdown syntax with an example and its result, and the differences between GitHub, Discord, Slack and Obsidian. Open any example in the editor to change it.
Cheat sheetBasic syntax
The core of Markdown, supported almost everywhere.
# Document title ## Section ### Subsection
Headings
**This text is bold** __This text is also bold__
Bold
*This text is italic* _This text is also italic_
Italic
> Ship small changes often. > Each one is easier to review.
Blockquotes
- Milk - Eggs - Bread 1. Preheat the oven 2. Mix the batter 3. Bake for 30 minutes
Lists
```python def greet(name): return f"Hello, {name}!" ``` Call `greet()` with a name.Code blocks
[Example](https://example.com) <https://example.com>
Links

Images
The first part. --- The second part.
Horizontal lines
Roses are red,\ violets are blue. A blank line starts a new paragraph.
Line breaks
\*Not italic\* \# Not a heading `*shown as typed*`
Escaping characters
Extended syntax
Tables, task lists and other additions from GitHub and popular apps.
| Name | Role | Since | | --- | --- | --- | | Ana | Design | 2021 | | Ben | Engineering | 2019 |
Tables
- [x] Pick a title - [ ] Write the draft - [ ] Ask for a review
Task lists
~~This text is struck through~~
Strikethrough
Markdown was created in 2004.[^1] [^1]: By John Gruber, with help from Aaron Swartz.
Footnotes
Remember to <mark>back up your files</mark> first.
Highlight
The area of a circle is $A = \pi r^2$. $$ \int_0^1 x^2 \, dx = \frac{1}{3} $$Math and LaTeX
Formatting with HTML
Underline, color, centering and other formatting Markdown has no syntax for.
<ins>This text is underlined</ins> <u>This text is underlined too</u>
Underline
Visible text. <!-- This note is hidden. --> [//]: # (This one is hidden too.) More visible text.
Comments
$\color{#d1242f}{\text{Red text}}$ and $\color{#1a7f37}{\text{green text}}$Text color
<p align="center">This line is centered.</p>
Center and align
<details> <summary>Click to expand</summary> Hidden content with **Markdown** in it. </details>
Collapsible sections
E = mc<sup>2</sup> and H<sub>2</sub>O
Superscript and subscript