Markdown 基本语法
Markdown 基本语法
标题
在单词或短语前添加井号(#)+ 一个空格,且井号(#)的数量代表标题的级别。
一级标题:
# 我是一级标题
二级标题:
## 我是二级标题
可选语法:文本下方添加任意数量的 == 号来标识一级标题,或者 -- 号来标识二级标题
heading level 1
==============
或
heading level 2
---------------
段落
要创建段落,请使用空白行将一行或多行文本进行分隔
I really like using Markdown.
I think I`ll use it to format all of my documents form now on.
换行
在一行的末尾添加两个或多个空格,然后按回车键,即可创建一个换行(<br>)
This is the first line.
And this is the second line.
粗体
要加粗文本,请在单词或短语的前后各添加两个星号(**)或下划线(__)。
I just love **bold text**.
I just love __bold text__.
Love**is**bold
斜体
要用斜体显示文本,请在单词或短语前后添加一个星号(*)或下划线(_)。
Italicized text is the *cat's meow*.
Italicized text is the _cat's meow_.
粗斜体
要同时用粗体和斜体突出显示文本,请在单词或短语的前后各添加三个星号或下划线。
This text is ***really important***.
This text is ___really important___.
引用
要创建块引用,请在段落前添加一个 > 符号。
> Dorothy followed her through many of the beautiful rooms in her castle.
多个段落的块引用
块引用可以包含多个段落。为段落之间的空白行添加一个 > 符号。
> Dorothy followed her through many of the beautiful rooms in her castle.
>
> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.
嵌套块引用
块引用可以嵌套。在要嵌套的段落前添加一个 >> 符号。
> Dorothy followed her through many of the beautiful rooms in her castle.
>
>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.
带有其它元素的块引用
块引用可以包含其他 Markdown 格式的元素。
> #### The quarterly results look great!
>
> - Revenue was off the chart.
> - Profits were higher than ever.
>
> *Everything* is going according to **plan**.
有序列表
要创建有序列表,请在每个列表项前添加数字并紧跟一个英文句点。数字不必按数学顺序排列,但是列表应当以数字 1 起始。
1. First item
2. Second item
3. Third item
4. Fourth item
无序列表
要创建无序列表,请在每个列表项前面添加破折号 (-)、星号 (*) 或加号 (+) 。
- First item
* First item
+ First item
- Third item
- Indented item
代码块
要将单词或短语表示为代码,请将其包裹在反引号 (`) 中。
At the command prompt, type `nano`.
转义反引号
如果你要表示为代码的单词或短语中包含一个或多个反引号,则可以通过将单词或短语包裹在双反引号(``)中。
多行代码块
多行代码块使用(```xml)
分割符
分隔符使用(---)请在分隔线的前后均添加空白行。
Try to put a blank line before...
---
...and after a horizontal rule.
链接
链接文本放在中括号内,链接地址放在后面的括号中,链接title可选。
[超链接显示名](超链接地址 "超链接title")
带格式化的链接:
强调 链接, 在链接语法前后增加星号。 要将链接表示为代码,请在方括号中添加反引号。
图片
要添加图像,请使用感叹号 (!), 然后在方括号增加替代文本,图片链接放在圆括号里,括号里的链接后可以增加一个可选的图片标题文本。

链接图片:
[](https://markdown.com.cn)
转义字符
要显示原本用于格式化 Markdown 文档的字符,请在字符前面添加反斜杠字符 \ 。
\* Without the backslash, this would be a bullet in an unordered list.
*hello
内嵌 HTML 标签
对于 Markdown 涵盖范围之外的标签,都可以直接在文件里面用 HTML 本身。如需使用 HTML,不需要额外标注这是 HTML 或是 Markdown,只需 HTML 标签添加到 Markdown 文本中即可。
This **word** is bold. This <em>word</em> is italic.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!