Markdown syntax cheat sheet
| Markdown | Result |
|---|---|
| # Heading 1 | H1 heading |
| ## Heading 2 | H2 heading |
| **bold text** | Bold |
| *italic text* | Italic |
| ~~strikethrough~~ | Strikethrough |
| `inline code` | Inline code |
| [Link](https://url) | Hyperlink |
|  | Image |
| > blockquote | Blockquote |
| --- | Horizontal rule |
| - item | Unordered list item |
| 1. item | Ordered list item |
Fenced code blocks
Use triple backticks to create code blocks. Add a language hint after the opening backticks for syntax highlighting (when rendered with a highlighter):
```javascript
const x = 42;
```
Tables (GitHub Flavored Markdown)
GFM tables use pipes and hyphens. Alignment is set with colons in the separator row:
| Left | Center | Right |
|:-----|:------:|------:|
| A | B | C |
:--- = left aligned, :---: = center, ---: = right aligned.
Where is Markdown used?
- GitHub / GitLab — README files, issues, pull requests, wikis
- Documentation sites — Docusaurus, MkDocs, GitBook, Notion
- Static site generators — Jekyll, Hugo, Astro, Next.js MDX
- Note-taking apps — Obsidian, Bear, Typora, Notion
- Chat apps — Slack, Discord (subset), Mattermost
- Email — some platforms convert Markdown to styled HTML emails