列表
创建有序和无序列表
有序列表
| Markdown 语法 | HTML 语法 | 渲染效果 |
|---|---|---|
1. item first2. item second3. item third |
| 1. item first 2. item second 3. item third |
1. item first2. item second3. item third4. item fourth |
| 1. item first 2. item second 3. item third 4. item fourth |
有序列表的最佳实践
Markdown 允许你使用) 作为分隔符,但从兼容性考虑,请不要这么做
| ✅ Do this | ❌ Don't do this |
|---|---|
1. item first2. item second3. item third | 1) item first2) item second3) item third |
无序列表
| Markdown 语法 | HTML 语法 | 渲染效果 |
|---|---|---|
- item first- item second- item third |
| - item first - item second - item third |
- item first- item second- item third- item fourth |
| - item first - item second - item third - item fourth |
+ item first+ item second+ item third |
| + item first + item second + item third |
* item first* item second* item third |
| * item first * item second * item third |
* item first* item second* item third* item fourth |
| * item first * item second * item third * item fourth |
无序列表最佳实践
不同Markdown应用程序在处理相同的分隔符情况并不一致,建议在同一列表中使用同一种分隔符。
| ✅ Do this | ❌ Don't do this |
|---|---|
- item first- item second- item third | * item first- item second+ item third |
在列表中嵌套其他元素
要在保留列表连续性的同时在列表内添加另一种其他元素,请将该元素缩进四个空格或一个制表符,如下所示⬇️:
插入段落
* This is the first list item.
* Here is the second list item.
add another paragraph in the same list item.
* This is the third list item.
渲染效果如下:
-
This is the first list item.
-
Here is the second list item.
add another paragraph in the same list item.
-
This is the third list item.
插入引用块
* This is the first list item.
* Here is the second list item.
> A blockquote would look great below the second list item.
* This is the third list item.
渲染效果如下:
-
This is the first list item.
-
Here is the second list item.
A blockquote would look great below the second list item.
-
This is the third list item.
插入图片
* This is the first list item.
* Here is the second list item.

* This is the third list item.
渲染效果如下:
-
This is the first list item.
-
Here is the second list item.

-
This is the third list item.