Last Updated: May 1, 2025
Basic Syntax
| Element | Syntax | Output |
|---|---|---|
| Heading | # H1, ## H2, ### H3...###### H6 | 6 levels of headings |
| Bold | **bold** or __bold__ | bold |
| Italic | *italic* or _italic_ | italic |
| Strikethrough | ~~strikethrough~~ | Crossed out |
| Link | [text](https://url) | Clickable link |
| Image |  | Embedded image |
| Code Inline | `code` | Monospace inline |
| Blockquote | > quoted text | Indented quote |
Lists & Code Blocks
- item
- item2Unordered list with dashes, asterisks, or plus signs
1. First
2. SecondOrdered list — numbers auto-increment (all 1s works too!)
- Nested itemIndent 2 spaces to nest lists
```python
code here
```Fenced code block with language for syntax highlighting
indented 4 spacesIndented 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] checkedTask 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 definitionFootnote reference and definition
GitHub-Flavored Special Features
| Item | Description |
|---|---|
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.