Markdown 基本语法

Markdown 基本语法

标题

在单词或短语前面添加井号 (#) 。# 的数量代表了标题的级别。例如,添加三个 # 表示创建一个三级标题### 三级标题


 

字体

要加粗文本,在单词或短语的前后各添加两个星号。例如**Hello,World!**, Hello,World!

要斜体显示文本,在单词或短语的前后各添加一个星号。例如*Hello,World!*, Hello,World!

既要加粗又要斜体显示,在单词或短语的前后各添加三个星号。例如***Hello,World!***, Hello,World!

要删除一段话时,在单词或短语的前后各添加两个波浪号。例如~~Hello,World!~~, Hello,World!


 

引用

单段落引用

要创建引用,在段落前加一个>符号。例如:

 > Dorothy followed her through many of the beautiful rooms in her castle.

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.


嵌套引用

引用可以嵌套。在要嵌套的段落前添加一个 >> 符号。例如

 > 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.


 

分隔符

创建分隔线,请在单独一行上使用三个或多个星号 (***)、破折号 (---) 或下划线 (___) ,并且不能包含其他内容。


 

图片

添加图像,请使用感叹号 (!), 然后在方括号增加替代文本,图片链接放在圆括号里括号里的链接(可以是本地链接也可以是网络链接)后可以增加一个可选的图片标题文本。例如

![这是图片](/assets/img/philly-magic-garden.jpg "Magic Gardens")

截图


 

超链接

超链接文字

给文字增加超链接,将文字写在方括号中,然后将链接添加在圆括号中。例如[点击跳转](https://markdown.com.cn)

点击跳转


超链接图片

给图片增加链接,请将图像的语法信息括在方括号中,然后将链接添加在圆括号中。

 [![沙漠中的岩石图片](/assets/img/shiprock.jpg "Shiprock")](https://markdown.com.cn)

图片


 

列表

有序列表

创建有序列表,在每个列表项前添加数字并紧跟一个英文句点加一个空格。数字不必按数学顺序排列,但是列表应当以数字 1 起始。

例如1. First item 2. Second item 3. Third item 4. Fourth item

  1. 222

  2. 34我


无序列表

无序列表,请在每个列表项前面添加破折号 (-)、星号 (*) 或加号 (+) 并加上空格。缩进一个或多个列表项可创建嵌套列表。例如- aaa - bbb

  • a

  • b


 

代码块

要创建代码块,用```将你要写的代码语言名称包裹其中。

 ```python```
 # 该实例输出 Hello World!
 print('Hello World!')

 

 

 

posted @ 2021-02-06 21:41  子垚  阅读(63)  评论(0)    收藏  举报