最多可有六级标题,在标题前加 #
作为标记。注意标记与标题内容之间有空格:
# 这是一级标题
## 这是二级标题
### 这是三级标题
#### 这是四级标题
##### 这是五级标题
###### 这是六级标题
显示如下:
段内换行:
2空格加回车(Typora不可用),Typora使用 Shift
+ Enter
可实现换行。
使用br
This is<br>
paragraph one.
And this is paragraph two.
显示如下:
This is
paragraph one.
And this is paragraph two.
段落:段与段间隔一个或多个空行,如下所示
This is Paragraph1
Here is Another
显示如下
This is Paragraph1
Here is Another
在行首使用 \>
标记,下一行不加 \>
也会继续引用:
> This is a comment
This is another comment
显示如下:
This is a comment
This is a comment too
多级引用:
> This is a comment
> This is another comment
> Blabla
显示如下:
This is a comment
This is another comment
Blablabla
使用 -
或 +
或 *
作为标记(等价):
- use '-' as mark
+ or use '+' as mark
* or use '*' as mark
显示如下:
use ‘-‘ as mark
or use ‘+‘ as mark
or use ‘*‘ as mark
被嵌套的标目标记前加四个spaces或一个tab,可使用嵌套的列表:
+ 1
+ 2
+ 3
显示如下:
使用数字作为标记:
1. item1
2. item1
1. item 2.1
2. item 2.2
此为Markdown拓展语法,并不是所有浏览软件都能够支持。效果为生成一个可以勾选的列表:
- [ ] Eat
- [x] Code
- [x] HTML
- [x] CSS
- [x] JavaScript
- [ ] Sleep
效果如下(Typora中的截图):
使用三个或更多的 *
或 +
或 _
绘制分割线:
***
+++
___
+++
也可以直接使用HTML标记 <hr>
。
使用 *
或 _
包围文字是文字变为斜体,使用 **
或 __
包围文字实现黑体,二者可同时使用。成对使用二者并且需要显示原内容时,使用转义 \*
或 \_
:
*This text will be italic*
_This will also be italic_
**This text will be bold**
__This will also be bold__
_You **can** combine them_
效果如下:
This text will be italic
This will also be italic
This text will be bold
This will also be bold
You can combine them
Markdown不支持此类标记原生语法,但可以使用由Github等提供的拓展的Markdown或者直接使用HTML提供的语法:
<u>Underlined Text</u>
~~DELETED~~
Underlined Text
DELETED
在Markdown内使用HTML tag是可以接受的,通过设置 <font>
来进一步设置字体:
<font size="5" color="red">This is some text!</font>
This is some text!
格式为 [link text](URL "Optional title")
,可用 ‘
或 "
。例如:
[MyBlog](https://www.cnblogs.com/wyzersblog/ "ddkk64")
[icon.png](./images/icon.png)
[Google][]
这样可以使代码更加整洁
[Google]: http://google.com/
使用 <>
包括的 URL 或邮箱地址会被自动转换为超链接,会使用 URL 作为链接文字。
<http://example.com/>
对于e-mail地址,Markdown会做一些随机编码处理以防止垃圾邮件机器人收集信息1:
<address@example.com>


![Alt text][id]
这样可以使代码更加整洁
[id]: url/to/image "Optional title attribute"
这样可以使代码更加整洁
标准markdown语法没有提供图片属性的修改,但可以使用HTML的 <img>
属性进行修改。
Markdown本身并不支持数学公式渲染生成 ,要在Markdown文档内使用数学公式,有但不限于以下几种选择:
博客园Markdown支持Latex数学输入:
内联的公式 $\sin(\alpha+\beta)=\sin\alpha\cos\beta+\cos\alpha\sin\beta$
内联的公式 \(\sin(\alpha+\beta)=\sin\alpha\cos\beta+\cos\alpha\sin\beta\)
**(算数-均值不等式)**设$a_1,a_2,...,a_n$为正数,有
$$
\frac{n}{\sum_{k=1}^{n}\frac{1}{a_k}} \le \sqrt[n]{a_1a_2...a_n} \le \frac{1}{n}\sum_{k=1}^{n}a_k \tag{1.1}
$$
当且仅当 $a_1=a_2=..=a_n$ 取等号。
(算数-均值不等式)设\(a_1,a_2,...,a_n\)为正数,有
\[
\frac{n}{\sum_{k=1}^{n}\frac{1}{a_k}} \le \sqrt[n]{a_1a_2...a_n} \le \frac{1}{n}\sum_{k=1}^{n}a_k \tag{1.1}
\]
当且仅当 \(a_1=a_2=..=a_n\) 取等号。
表格也属于拓展语法。
使用 |
来分隔不同的单元格,使用 -
来分隔表头和其他行:
First Header | Second Header
------------ | -------------
Content from cell 1 | Content from cell 2
Content in the first column | Content in the second column
First Header | Second Header |
---|---|
Content from cell 1 | Content from cell 2 |
Content in the first column | Content in the second column1 |
我用博客园的Markdown预览试了下,并没有发现任何的加密。?
原文:https://www.cnblogs.com/wyzersblog/p/11968204.html