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 syntax
Markdown
# 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 breaks
Markdown
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

3.Text Formatting & Emphasis

Bold, italic, strike, highlight, underline, sub/sup, kbd
Markdown
**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
Strikethrough text
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 & checkboxes
Markdown
- 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
Markdown
1. First step
2. Second step
   1. Sub-step A
   2. Sub-step B
   - Mixed bullet inside numbered list
3. Third step
Output
  1. First step
  2. Second step
    1. Sub-step A
    2. Sub-step B
    • Mixed bullet inside numbered list
  3. Third step
Markdown
- [x] Completed task
- [ ] Pending task
  - [x] Nested completed subtask
  - [ ] Nested open subtask
Output

6.Images

Embedded, titled, clickable & resized
Markdown
![Alt text describing image](path/to/image.png)
![Alt text](image.png "Optional hover title")
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
[![Clickable Thumbnail](thumb.png)](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, CAUTION
Markdown
> 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: const total = price * qty;
Literal backtick: Use `backticks` inside
Markdown
```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 escaping
Markdown
| Left Align | Center Align | Right Align |
| :--- | :---: | ---: |
| **Bold** | `inline()` | 100 |
| Pipe `a \| b` | *Italic* | 250 |
Output
Left AlignCenter AlignRight Align
Boldinline()100
Pipe a | bItalic250
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 card
Markdown
---
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 underscores
Markdown
---

***

___
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
WriteResultWriteResult
\**\##
\__\``
\[ \][ ]\||
\\\\>>

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 shortcuts
Markdown
<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