Markdown的基本语法记录

1.标题

示例代码:

# 标题1
## 标题2
### 标题3
#### 标题4
##### 。。。

效果:

标题1

标题2

标题3

标题4

。。。

注:# 后面应保持空格

2. 分级标题

示例代码:

一级标题
===================
二级标题
------------------

效果:

一级标题

二级标题

注: = - 最少写两个

3.引用

代码示例

单行引用
>hello,python

多行引用
>hello,python

>>hello,world

>>>hello,123

效果:

单行引用

hello,python

多行引用

hello,python

hello,world

hello,123

注:>可以一直加

4.行内标记

代码示例:

这是`我的`一句话

效果:
这是我的一句话

6.字体加粗

代码示例:

**这是一行字**

效果:
这是一行字

7.字体斜体

代码示例:

*这是一行字*
_这是一行字_

效果:
这是一行字
这是一行字

8.粗体斜体

代码示例:

***这是一行字***
**_这是一行字_**

效果:
这是一行字
这是一行字

9.字体删除字

代码示例:

~~这是一行字~~

效果:
这是一行字

10.格式化文本

保持输入的格式排版不变
代码示例:

<pre>
aaa
bbb
ccc    asdha
</pre>

效果:

aaa
bbb
ccc    asdha

11.代码块

代码块1
代码示例:
```
print("hello,python")
```

效果:

print("hello,python")

代码块2(自定义语法)
代码示例:
```python
print("hello,python")
```

```java
System.out.print("hello,java")
```

效果:

print("hello,python")
System.out.print("hello,java")

注:这里为了演示代码用到了\` 来区别代码块中的`字符,用<code></code>代替了```包含的代码块

12.插入超链接

代码示例:

[百度](http://www.baidu.com)

效果:
百度

13.插入图片

代码示例:

![图片无法正常显示时显示的文本](./123.png)

效果:
图片无法正常显示时显示的文本
注:可使用相对路径

14.序列

有序列表

示例代码:

1. one
2. two
3. three  

效果:

  1. one
  2. two
  3. three

无序列表

示例代码:

- one
+ two
* three

效果:

  • one
  • two
  • three
序列的嵌套

示例代码:

1. one
   1. one
   2. one
2. two
   + two
   + two
      - three
      - three

效果:

  1. one
    1. one
    2. one
  2. two
    • two
    • two
      • three
      • three

注: 此时应在下级敲出空格

15.表格

示例代码:

幺|幺|零
-:|:-:|:-
你|我|它
一个个|二个个|三个个
四个个|五个个|六个个

效果:

一个个 二个个 三个个
四个个 五个个 六个个

注: 第二行表示分割出表头和内容,其中-至少打出一个,:在左边表示左对齐,在右边表示右对齐,两个:表示居中对齐

原文地址:https://www.cnblogs.com/During/p/10742444.html