Markdown Cheatsheet Cheat Sheet

Complete Markdown reference — basic syntax, extended GFM features, tables, code blocks, admonitions, footnotes, and advanced formatting for documentation and READ.

Last Updated: May 1, 2025

Basic Syntax

ElementSyntaxOutput
Heading# H1, ## H2, ### H3...###### H66 levels of headings
Bold**bold** or __bold__bold
Italic*italic* or _italic_italic
Strikethrough~~strikethrough~~Crossed out
Link[text](https://url)Clickable link
Image![alt](image.png)Embedded image
Code Inline`code`Monospace inline
Blockquote> quoted textIndented quote

Lists & Code Blocks

- item - item2
Unordered list with dashes, asterisks, or plus signs
1. First 2. Second
Ordered list — numbers auto-increment (all 1s works too!)
- Nested item
Indent 2 spaces to nest lists
```python code here ```
Fenced code block with language for syntax highlighting
indented 4 spaces
Indented code block (no language support)
```mermaid graph TD; A-->B; ```
Mermaid diagrams in GitHub/GitLab

Tables & Advanced (GFM)

| Col1 | Col2 | |------|------| | A | B |
Basic table — colons in separator align: :--- left, ---: right, :---: center
| Left | Center | Right | |:-----|:------:|------:| | L | C | R |
Left, center, right alignment
- [ ] unchecked - [x] checked
Task lists (checkboxes in GitHub issues/PRs)
~~strikethrough~~
Strikethrough text (GFM extension)
footnote[^1] [^1]: The footnote text.
Footnotes (some renderers)
--- or *** or ___
Horizontal rule (3+ characters)
[^1]: Footnote definition
Footnote reference and definition

GitHub-Flavored Special Features

ItemDescription
Mention@username notifies a user
Issue Reference#123 links to issue/PR #123 in the repo
Emoji:smile: → 😄. Full list at emoji-cheat-sheet.com
Collapsible Sections
ClickHidden content
Diff Syntax```diff - removed + added ``` — colored diff in code blocks
Alerts/Admonitions (GH) > [!NOTE] / > [!WARNING] / > [!IMPORTANT] / > [!TIP] / > [!CAUTION]
Pro Tip: Use the Markdown All in One VS Code extension for keyboard shortcuts (Ctrl+B bold, Ctrl+I italic) and automatic table of contents generation. Preview with Ctrl+Shift+V.