终极 Markdown 语法指南与速查表
您的一站式 Markdown 参考指南。从标准的 GFM 格式到 Mermaid 图表和 LaTeX 数学公式等高级功能——助您轻松编写结构清晰、内容丰富的文档。
1排版、格式与文本样式
掌握基本格式:粗体、斜体、删除线以及各级标题 (H1-H6)。学习如何设置文本样式以强调重点和提高清晰度。
# Heading Level 1
## Heading Level 2
### Heading Level 3
#### Heading Level 4
##### Heading Level 5
###### Heading Level 6
You can make text **bold**, *italic*, or ***both***.
You can also use ~~strikethrough~~ to indicate deleted text.
Using HTML tags for subscript/superscript:
H<sub>2</sub>O and E = mc<sup>2</sup>
Keyboard input:
Press <kbd>Ctrl</kbd> + <kbd>C</kbd> to copy.Heading Level 2
Heading Level 3
Heading Level 4
Heading Level 5
Heading Level 6
You can make text bold, italic, or both.
You can also use strikethrough to indicate deleted text.
Using HTML tags for subscript/superscript: H2O and E = mc2
Keyboard input: Press Ctrl + C to copy.
2列表:有序、无序与任务列表
使用项目符号、数字列表和嵌套项创建条理清晰的内容。使用交互式 GFM 任务列表跟踪进度。
### Unordered List
- Project Alpha
- Project Beta
- Frontend
- React
- Vue
- Backend
- Node.js
- Python
### Ordered List
1. Step One
2. Step Two
1. Sub-step A
2. Sub-step B
3. Step Three
### Task List
- [x] Design Database Schema
- [x] Set up API endpoints
- [ ] Write documentation
- [ ] Deploy to productionUnordered List
- Project Alpha
- Project Beta
- Frontend
- React
- Vue
- Backend
- Node.js
- Python
- Frontend
Ordered List
- Step One
- Step Two
- Sub-step A
- Sub-step B
- Step Three
Task List
- Design Database Schema
- Set up API endpoints
- Write documentation
- Deploy to production
3超链接、图片与多媒体
嵌入图片、为文本添加超链接以及使用 Base64 编码的图片。学习标准链接语法和图片包含方法。
[Visit MD2Word](https://markdowntoword.pro)

**Image with Link:**
[](https://markdowntoword.pro)
**Base64 Image:**
4引用块与 GitHub 警告
使用引用块和 GitHub 风格的警告(注意、提示、重要、警告、小心)来突出重要信息。
> Markdown is a lightweight markup language with plain text formatting syntax.
>
> > It is designed so that it can be converted to HTML and many other formats using a tool by the same name.
> [!NOTE]
> This is a note alert. Useful for general information.
> [!TIP]
> Pro Tip: You can drag and drop markdown files to convert them!
> [!IMPORTANT]
> Do not forget to check the preview before exporting.
> [!WARNING]
> This action cannot be undone.
> [!CAUTION]
> Proceed with extreme caution!Markdown is a lightweight markup language with plain text formatting syntax.
It is designed so that it can be converted to HTML and many other formats using a tool by the same name.
NOTE
This is a note alert. Useful for general information.
TIP
Pro Tip: You can drag and drop markdown files to convert them!
IMPORTANT
Do not forget to check the preview before exporting.
WARNING
This action cannot be undone.
CAUTION
Proceed with extreme caution!
5代码块与语法高亮
显示带有各种编程语言(Python、JS 等)语法高亮的代码片段,并使用行内代码表示变量。
Inline code is wrapped in backticks: `const x = 10;`
```tsx
import React from 'react';
const Button = ({ children }) => {
return (
<button className="bg-blue-500 text-white px-4 py-2 rounded">
{children}
</button>
);
};
```
```python
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
```
```json
{
"name": "md2word",
"version": "1.0.0",
"features": ["html", "docx", "pdf"]
}
```Inline code is wrapped in backticks: const x = 10;
import React from 'react';
const Button = ({ children }) => {
return (
<button className="bg-blue-500 text-white px-4 py-2 rounded">
{children}
</button>
);
};
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
{
"name": "md2word",
"version": "1.0.0",
"features": ["html", "docx", "pdf"]
}
6表格、对齐与表情符号
使用 GFM 表格组织数据,控制单元格对齐方式,并插入有趣的表情符号来增强文档效果。
| Feature | Support | Notes |
| :--- | :---: | ---: |
| **Tables** | ✅ | Easy to read |
| **Alignment** | 🟢 | Left/Center/Right |
| **Math** | 🧮 | KaTeX based |
| **Charts** | 📊 | Mermaid based |
| **Emojis** | 🎉 | :rocket: :heart: :smile: || Feature | Support | Notes |
|---|---|---|
| Tables | ✅ | Easy to read |
| Alignment | 🟢 | Left/Center/Right |
| Math | 🧮 | KaTeX based |
| Charts | 📊 | Mermaid based |
| Emojis | 🎉 | :rocket: :heart: :smile: |
7脚注与参考文献
添加学术风格的引文和脚注,保持内容整洁的同时提供必要的参考资料。
Markdown is a lightweight markup language[^1].
It was created by John Gruber in 2004[^2].
[^1]: Markdown is often used for formatting readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor.
[^2]: John Gruber created the Markdown language in 2004 in collaboration with Aaron Swartz.8HTML 元素(可折叠详情)
使用原始 HTML 标签(如 <details> 和 <summary>)为常见问题解答或额外内容创建交互式可折叠部分。
<details>
<summary><b>Click to expand System Requirements</b></summary>
- Processor: 2.5 GHz dual-core Intel Core i5
- Memory: 8 GB RAM
- Graphics: Intel Iris Plus Graphics 640
- Storage: 200 MB available space
</details>
<details>
<summary><b>Show Terms of Service</b></summary>
By using this service, you agree to...
1. Be nice
2. Write good markdown
</details>Click to expand System Requirements
- Processor: 2.5 GHz dual-core Intel Core i5
- Memory: 8 GB RAM
- Graphics: Intel Iris Plus Graphics 640
- Storage: 200 MB available space
Show Terms of Service
By using this service, you agree to...
- Be nice
- Write good markdown
9LaTeX 数学公式与方程
使用 LaTeX 语法数学块 (KaTeX) 渲染复杂的数学公式。非常适合科学和学术写作。
### 1. Simple (Inline & Block)
Newton's second law is $F=ma$.
The mass-energy equivalence:
$$ E = mc^2 $$
### 2. Medium (Integrals & Fractions)
The Gaussian Integral:
$$
\int_{-\infty}^\infty e^{-x^2}dx = \sqrt{\pi}
$$
### 3. Complex (Limits & Summation)
Definition of Derivative:
$$
\frac{\partial f}{\partial x} = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}
$$
Sum of Squares:
$$
\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}
$$1. Simple (Inline & Block)
Newton's second law is . The mass-energy equivalence:
2. Medium (Integrals & Fractions)
The Gaussian Integral:
3. Complex (Limits & Summation)
Definition of Derivative:
Sum of Squares:
10Mermaid 图表与图形
可视化流程和数据。直接在 Markdown 中使用 Mermaid.js 创建流程图、时序图、饼图等。
```mermaid
graph LR
A[Client] -->|HTTP Request| B(Load Balancer)
B --> C{Server Cluster}
C -->|One| D[Server 1]
C -->|Two| E[Server 2]
C -->|Three| F[Server 3]
D --> G[(Database)]
```
```mermaid
sequenceDiagram
autonumber
User->>System: Login Request
System->>DB: Query User
DB-->>System: Return User Data
System-->>User: Grant Access
```
```mermaid
pie title Programming Languages Used
"TypeScript" : 55
"Python" : 30
"Rust" : 10
"Go" : 5
```