此 Markdown 語法 速查表 涵蓋了從基本格式到高階元素的所有內容。將其用作日常參考或在轉換文件時使用 WordToMD 並且需要清理輸出。
文本格式
**Bold text**
*Italic text*
***Bold and italic***
~~Strikethrough~~
`Inline code`
| 語法 | 輸出 |
|---|---|
**Bold** | 粗體 |
*Italic* | 斜體 |
***Bold and italic*** | 粗體和斜體 |
~~Strike~~ | |
`code` | code |
標題
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
完整參考: Markdown 標題指南
段落和換行符
First paragraph.
Second paragraph (blank line separates paragraphs).
First line
Second line (two trailing spaces create a line break)
列表
無序列表
- Item one
- Item two
- Nested item (indent 2 spaces)
- Another nested item
- Item three
同樣有效: * or + 代替 -
有序列表
1. First item
2. Second item
1. Nested item
3. Third item
任務列表 (GFM)
- [x] Completed task
- [ ] Pending task
- [ ] Another pending task
連結
[Link text](https://example.com)
[Link with title](https://example.com "Hover title")
[Reference link][ref-id]
[ref-id]: https://example.com "Optional title"
Bare URL: https://example.com (GFM auto-links)
影像


![Reference image][img-id]
[img-id]: /path/to/image.png "Optional title"
塊引用
> Single blockquote
> Multi-line blockquote
> continues on the next line
> Nested blockquote
> > Inner level
程式碼
內聯程式碼
Use `console.log()` to debug.
防護程式碼塊
```javascript
const x = 42;
console.log(x);
```
無語言的程式碼塊
```
Plain preformatted text
no syntax highlighting
```
完整參考: Markdown 程式碼塊指南
表格 (GFM)
| Header 1 | Header 2 | Header 3 |
|---|---|---|
| Cell | Cell | Cell |
| Cell | Cell | Cell |
列對齊
| Left | Center | Right |
|:---|:---:|---:|
| text | text | text |
完整參考: Markdown 表:完整指南
水平規則
---
***
___
(三個或更多連字元、星號或下劃線)
Markdown 中的 HTML
大多數 Markdown 處理器都允許使用原始 HTML:
<details>
<summary>Click to expand</summary>
Hidden content here.
</details>
上標 <sup>text</sup>
下標 <sub>text</sub>
轉義特殊字元
使用反斜槓轉義 Markdown 字元:
\*Not italic\*
\# Not a heading
\| Not a table cell
可以轉義的字元: \ * _ {} [] () # + - . ! |
腳註(擴充套件 Markdown)
This claim needs a source.[^1]
[^1]: Here is the footnote text.
GitHub 上不支援,但 Pandoc 和 MultiMarkdown 支援。
定義列表(擴充套件 Markdown)
Term
: Definition of the term
Another Term
: First definition
: Second definition
Pandoc Markdown 和一些靜態站點生成器支援。
表情符號 (GFM)
:smile: :rocket: :warning: :check:
GitHub 和許多 Markdown 平臺都支援表情符號短程式碼。
標題 (YAML)
由靜態站點生成器和 Obsidian 使用:
---
title: "Document Title"
date: 2026-05-29
tags: [markdown, reference]
draft: false
---
必須是檔案中的第一個內容,位於任何內容之前。
特定於平臺的擴充套件
| 特點 | GitHub | Obsidian | GitBook | Notion |
|---|---|---|---|---|
| 任務列表 | ✅ | ✅ | ✅ | ✅ |
| 表格 | ✅ | ✅ | ✅ | ✅ |
| 腳註 | ❌ | ✅ | ✅ | ❌ |
維基連結 [[link]] | ❌ | ✅ | ❌ | ❌ |
數學 $formula$ | ✅ | ✅ | ✅ | ❌ |
| 美人魚圖 | ✅ | ✅ | ✅ | ❌ |
快速參考卡
| 元素 | 語法 |
|---|---|
| H1 | # Heading |
| H2 | ## Heading |
| 粗體 | **text** |
| 斜體 | *text* |
| 連結 | [text](url) |
| 影像 |  |
| 列表項 | - item |
| 編號 | 1. item |
| 程式碼 | `code` |
| 塊程式碼 | ```lang |
| 報價 | > text |
| 表 | | col | col | |
| HR | --- |
| 任務 | - [ ] task |
| 刪除線 | ~~text~~ |
| 逃脫 | \*literal\* |
將 Word 轉換為 Markdown
有 Word 格式的文件嗎? WordToMD 立即將 .docx 轉換為 Markdown — 無需上傳,無需帳戶,完全免費。輸出遵循適用於 GitHub、Obsidian、Notion 和所有主要平臺的 GFM 語法。
另請參閱:
- 什麼是 Markdown? — 對於絕對的初學者
- Markdown 標題指南
- Markdown 表:完整指南
- Markdown 程式碼塊指南