Complete Markdown Reference Guide
Every Markdown syntax element shown explicitly with copy-ready code and rendered output - including all 6 heading levels, all 5 GitHub callout alerts, YAML frontmatter, escaping, KaTeX math, and Mermaid diagrams.
1.Headings (H1 to H6)
All 6 heading levels + Setext underline syntaxMarkdown
# Heading 1 (Page Title) ## Heading 2 (Major Section) ### Heading 3 (Subsection) #### Heading 4 (Sub-subsection) ##### Heading 5 (Minor Heading) ###### Heading 6 (Smallest Heading)
Output
Heading 1 (Page Title)
Heading 2 (Major Section)
Heading 3 (Subsection)
Heading 4 (Sub-subsection)
Heading 5 (Minor Heading)
Heading 6 (Smallest Heading)
Markdown
Alternate H1 Underline ====================== Alternate H2 Underline ----------------------
Output
Alternate H1 Underline
Alternate H2 Underline
Note: Always include one space between the # symbols and your heading text (write # Title, not #Title). Leave a blank line above and below headings.
2.Paragraphs & Line Breaks
Blank lines vs soft breaksMarkdown
First paragraph of text. Second paragraph separated by a blank line.
Output
First paragraph of text.
Second paragraph separated by a blank line.
Markdown
Line one with two trailing spaces Line two directly underneath Or use HTML break:<br>Next line
Output
Line one with two trailing spaces
Line two directly underneath
Line two directly underneath
3.Text Formatting & Emphasis
Bold, italic, strike, highlight, underline, sub/sup, kbdMarkdown
**Bold text** or __Bold text__
Output
Bold text
Markdown
*Italic text* or _Italic text_
Output
Italic text
Markdown
***Bold and Italic*** or ___Bold and Italic___
Output
Bold and Italic
Markdown
~~Strikethrough text~~
Output
Markdown
<mark>Highlighted</mark>, <u>Underlined</u>, H<sub>2</sub>O, X<sup>2</sup>, <kbd>Ctrl</kbd> + <kbd>K</kbd>
Output
Highlighted, Underlined, H2O, X2, Ctrl + K
4.Lists & Task Checklists
Unordered, ordered, nested, mixed & checkboxesMarkdown
- Bullet item (using -)
* Bullet item (using *)
+ Bullet item (using +)
- Nested level 2 (indent 2 spaces)
- Nested level 3 (indent 4 spaces)Output
- Bullet item (using -)
- Bullet item (using *)
- Bullet item (using +)
- Nested level 2
- Nested level 3
- Nested level 2
Markdown
1. First step 2. Second step 1. Sub-step A 2. Sub-step B - Mixed bullet inside numbered list 3. Third step
Output
- First step
- Second step
- Sub-step A
- Sub-step B
- Mixed bullet inside numbered list
- Third step
Markdown
- [x] Completed task - [ ] Pending task - [x] Nested completed subtask - [ ] Nested open subtask
Output
5.Links, Anchors & Wiki-Links
Inline, title, autolink, reference, internal & [[wiki]]Markdown
[Example Docs](https://example.com) [With Hover Tooltip](https://example.com "Tooltip title")
Output
Example Docs
With Hover Tooltip
With Hover Tooltip
Markdown
Autolink URL: <https://example.com> Autolink Email: <hello@example.com>
Output
Autolink URL: https://example.com
Autolink Email: hello@example.com
Autolink Email: hello@example.com
Markdown
Read the [Reference Guide][ref-id]. [ref-id]: https://example.com "Optional Title"
Output
Read the Reference Guide.
Markdown
Heading anchor: [Jump to Tables](#tables) Local file: [Architecture](./architecture.md) Wiki-Link: [[Other Note]] or [[Other Note|Custom Label]]
Output
Heading anchor: Jump to Tables
Local file: Architecture
Wiki-Link: Custom Label
Local file: Architecture
Wiki-Link: Custom Label
6.Images
Embedded, titled, clickable & resizedMarkdown
 
Output
Renders an embedded image. Alt text displays if the image fails to load and improves accessibility. Click any image in the workspace to open the zoom viewer.
Markdown
[](https://example.com) <img src="diagram.png" alt="Resized" width="320">
Output
Wrap an image in
[...](url) to make it clickable, or use an HTML <img width="320"> tag for exact pixel width.7.Blockquotes & All 5 GitHub Alerts
Quotes, nested quotes, NOTE, TIP, IMPORTANT, WARNING, CAUTIONMarkdown
> Standard single-line quote. > > Second paragraph inside the same quote. >> Nested inner blockquote.
Output
Standard single-line quote.
Second paragraph inside the same quote.Nested inner blockquote.
Markdown
> [!NOTE] > Helpful background information. > [!TIP] > Practical advice for better results. > [!IMPORTANT] > Essential requirement to succeed. > [!WARNING] > Immediate attention needed to avoid issues. > [!CAUTION] > High-risk action that may cause data loss.
Output
NOTE
Helpful background information.TIP
Practical advice for better results.IMPORTANT
Essential requirement to succeed.WARNING
Immediate attention needed to avoid issues.CAUTION
High-risk action that may cause data loss.8.Code Blocks & In-Browser Python
Inline code, escaped backticks, fenced languages & {test}Markdown
Inline code: `const total = price * qty;` Show literal backtick: ``Use `backticks` inside``
Output
Inline code:
Literal backtick:
const total = price * qty;Literal backtick:
Use `backticks` insideMarkdown
```python
def add(a, b):
return a + b
print(add(2, 3))
```Output
def add(a, b):
return a + b
print(add(2, 3))Markdown
```python {test}
def double(n): return n * 2
assert double(4) == 8
```Output
Python blocks execute safely inside your browser via Pyodide WebAssembly. Marking a block with
{test} lets you verify all assertions with one click.Note: Common language tags after triple backticks: python, javascript, typescript, html, css, json, yaml, bash, sql, c, cpp, java, rust, go, diff, markdown.
9.Tables & Column Alignment
Left (:---), Center (:---:), Right (---:) & pipe escapingMarkdown
| Left Align | Center Align | Right Align | | :--- | :---: | ---: | | **Bold** | `inline()` | 100 | | Pipe `a \| b` | *Italic* | 250 |
Output
| Left Align | Center Align | Right Align |
|---|---|---|
| Bold | inline() | 100 |
Pipe a | b | Italic | 250 |
Note: Escape a literal vertical bar inside a cell with \|. Leave a blank line above and below tables.
10.YAML Frontmatter (Metadata)
Top-of-file properties rendered as a clean cardMarkdown
--- id: PRM-001 title: Migration Playbook category: coding tags: - nextjs - python ---
Output
Place a
--- YAML block at line 1 of any Markdown file. Readme automatically formats it as a collapsible Properties card above the document.11.Horizontal Rules (Dividers)
Three or more hyphens, asterisks, or underscoresMarkdown
--- *** ___
Output
Section Above
Section Below
12.Escaping Special Characters
Prefix Markdown symbols with backslash \Markdown
\*Not italic\* \# Not a heading \_Not italic\_ \`Not code\` \[Not a link\] \| Literal pipe \\ Literal backslash \> Not a quote
Output
| Write | Result | Write | Result |
|---|---|---|---|
\* | * | \# | # |
\_ | _ | \` | ` |
\[ \] | [ ] | \| | | |
\\ | \ | \> | > |
13.Math & LaTeX Equations (KaTeX)
Inline $...$ and display block $$...$$Markdown
Inline math: $E = mc^2$ and $\alpha + \beta = \pi$
Display block math:
$$
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
$$Output
Inline: E = mc2 and α + β = π
Σi=1..n i = n(n + 1) / 2
14.Diagrams (Mermaid.js)
Flowcharts, Sequence, State & Pie charts (click to zoom)Markdown
```mermaid
flowchart LR
A[User Input] --> B{Valid?}
B -->|Yes| C[Process Data]
B -->|No| D[Show Error]
```Output
Renders as crisp SVG. Click any diagram or its Zoom / New Tab button to open the full-screen Pan & Zoom Viewer.
Markdown
```mermaid
sequenceDiagram
Client->>Server: GET /api/health
Server-->>Client: 200 OK
```Output
Supports
flowchart, sequenceDiagram, classDiagram, stateDiagram-v2, erDiagram, and pie.15.Collapsible Sections & Shortcuts
HTML <details>, comments & Readme keyboard shortcutsMarkdown
<details> <summary>Click to reveal details</summary> Hidden content goes here. </details> <!-- Hidden HTML comment -->
Output
Click to reveal details
Hidden content goes here.
Markdown
Ctrl + K : Universal Full-Text Search Ctrl + B : Toggle Left Explorer Sidebar Alt + Left/Right: Back / Forward File History Esc : Close Active Modal or Viewer
Output
Ctrl + K Full-text search across all files
Ctrl + B Hide or show Explorer sidebar
Alt + ← / → Navigate file history
Esc Close modal or diagram zoom viewer