Markdown基本语法

一.前言

Markdown是一种可以使用普通文本编辑编写的标记语言,通过简单的标记语法,它可以使普通文本内容具有一定的格式。

二.Markdown基本语法

2.1 标题

代码:

# 一级标题
## 二级标题
### 三级标题
#### 四级标题
##### 五级标题
###### 六级标题

效果:

一级标题

二级标题

三级标题

四级标题

五级标题
六级标题
2.2 加粗

代码:

**加粗**

效果:

加粗

2.3 斜体

代码:

*123*

效果:

123

2.4 高亮

代码:

==king==

效果:

king

2.5 上标

代码:

2^10^

效果:

210

2.6 下标

代码:

H~2~

效果:

H2

2.7 代码引用(`式)

代码:

`print('hello world')`

效果:

print('hello world')

2.8 代码引用(>式)

代码:

>hello world

效果:

hello world

2.9 代码引用(```式)

代码:

​```python
print('hello world')
​```

效果:

print('hello world')
2.10 插入链接

代码:

<https://www.duba.com/?f=edge>

效果:

https://www.duba.com/?f=edge

2.11 插入链接

代码:

[nickchen博客](https://www.cnblogs.com/nickchen121/p/10718112.html "nickchen博客")

效果:
nickchen博客

2.12 插入图片

代码:

![](https://img2018.cnblogs.com/blog/1739655/201907/1739655-20190711220149959-1189003139.png)

效果:

2.13 有序列表

代码:

1. one
2. two
3. three

效果:

  1. one
  2. two
  3. three
2.14 无序列表

代码:

* 1
* 2
* 3

效果:

  • 1
  • 2
  • 3
2.15 分割线

代码:

---

效果:


2.16 列表

代码:

name | age | sex 
:-:|:-|-:
tony|20|男
king|18|女

效果:

name age sex
tony 20
king 18
2.17 数学公式

代码:

$\sum_{i=1}^{10}f(i)\,\,\text{thanks}$

效果:

\(\sum_{i=1}^{10}f(i)\,\,\text{thanks}\)

2.18 数学公式

代码:

$$
\sum_{i=1}^{10}f(i)\,\,\text{thanks}
$$

效果:

\[\sum_{i=1}^{10}f(i)\,\,\text{thanks} \]

posted @ 2019-07-11 16:54  夜元  阅读(185)  评论(0)    收藏  举报