markdown快速学习
可以生成目标HTML的轻量级标记语言。
一、标题
Markdown提供2种样式的标题,对应到HTML种的 h1 到 h6 标签
- 第一种:只支持 h1 和h 2,分别用(=)和(-)表示
- 第二种:以#开头,1-6个字分别代表 h1 - h6
markdown例子:
一级标题
===
二级标题
---
### 三级标题
###### 六级标题
实际输出:
一级标题
二级标题
三级标题
六级标题
二、段落
像平时一段内容为一段,对应HTML中 blockquote 标签,连续两个回车即可。或使用两个以上空格加上回车。
markdown例子:
Now is the time for all good men to come to
the aid of their country. This is just a
regular paragraph.
The quick brown fox jumped over the lazy
dog's back.
实际输出:
Now is the time for all good men to come to the aid of their country. This is just a regular paragraph.
The quick brown fox jumped over the lazy dog's back.
三、引用
显示出引出的标志,段落开头用>符号,然后接一个空格,对应HTML中 p 标签
markdown例子:
> this is a blockquote.
>
> this is the second paragraph in blockquote.
>
> ## this is an H2 in a blockquote.
实际输出:
this is a blockquote
this is the second paragraph in the blockquote
this is an H2 in a blockquote
四、字体
支持斜体、加粗、
删除等。分别对应HTML中 em 、strong 、s 标签
markdown例子:
some of these words *are emphasized*.
some of these words _are emphasized also_.
use two asterisks for **strong emphasis**.
or, if you prefer,__use teo underscores instead__.
~~345~~
实际输出:
Some of these words are emphasized. Some of these words are emphasized also.
Use two asterisks for strong emphasis. Or, if you prefer, use two underscores instead.
345
五、分割线
可以使用3个连续的 * 或 _ 或 - 表示分割符号,对应HTML中的 hr 标签
markdown例子:
***
___
---
实际输出:
六、列表
列表分有序和序列之分,分别对应HTML中 ul 、 ol 标签
1. 无序列表
无序列表可以使用: * 或 + 或 - 符号
markdown例子:
* candy.
* gum.
* booze.
或
+ candy.
+ gum.
+ booze.
或
- candy.
- gum.
- booze.
实际输出:
- Candy.
- Gum.
- Booze.
2. 有序列表
有序列表使用:数字 与 符号 . 的形式
markdown例子:
1.red
2.green
3.blue
实际输出:
- Red
- Green
- Blue
七、超链接
markdown 对于超链接有两种写法,对应HTML中的 a 标签:
1. 图片
![图片](图片的网络地址)
比如
2. 链接
[链接名](连接地址)
比如
百度