markdown 備忘單 reference syntax

Markdown 語法速查表:您需要的每個元素

完整的 Markdown 語法 速查表 涵蓋標題、強調、列表、表格、程式碼塊、連結、影像等。將此參考新增為書籤以供日常使用。

W
WordToMD 團隊
·

此 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)

影像

![Alt text](image.png)
![Alt text](image.png "Optional title")
![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
---

必須是檔案中的第一個內容,位於任何內容之前。

特定於平臺的擴充套件

特點GitHubObsidianGitBookNotion
任務列表✅✅✅✅
表格✅✅✅✅
腳註❌✅✅❌
維基連結 [[link]]❌✅❌❌
數學 $formula$✅✅✅❌
美人魚圖✅✅✅❌

快速參考卡

元素語法
H1# Heading
H2## Heading
粗體**text**
斜體*text*
連結[text](url)
影像![alt](url)
列表項- item
編號1. item
程式碼`code`
塊程式碼```lang
報價> text
表| col | col |
HR---
任務- [ ] task
刪除線~~text~~
逃脫\*literal\*

將 Word 轉換為 Markdown

有 Word 格式的文件嗎? WordToMD 立即將 .docx 轉換為 Markdown — 無需上傳,無需帳戶,完全免費。輸出遵循適用於 GitHub、Obsidian、Notion 和所有主要平臺的 GFM 語法。

另請參閱: