[TOC]
1.1 常规语法
标题:
# H1
## H2
### H3
#### H4
##### H5
###### H6
段落:
粗体文本:**bold text**
斜体文本:*italicized text*
行内代码:`code`
分隔线:---
引用块:> blockquote
超链接:[title](https://www.example.com)
插入图片:
有序列表
1. First item
2. Second item
3. Third item
无序列表
- First item
- Second item
- Third item
1.2 扩展语法
上标:X<sup>2</sup>
下标:H<sub>2</sub>O
删除线:~~The world is flat.~~
脚注:
Here's a sentence with a footnote. [^1]
[^1]: This is the footnote.
表格:
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |
代码块:
```
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}
```
任务列表:
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media
自动生成目录树:[TOC]
手动生成目录树:
- [一级标题](#一级标题)
- [标题 1-1](#二级标题 1-1)
- [标题 1-2](#二级标题 1-2)
- [二级标题](#二级标题)
- [标题 2-1](#二级标题 2-1)
- [标题 2-2](#二级标题 2-2)
- [一级标题](#一级标题)
- [标题 1-1](#二级标题 1-1)
- [标题 1-2](#二级标题 1-2)
- [二级标题](#二级标题)
- [标题 2-1](#二级标题 2-1)
- [标题 2-2](#二级标题 2-2)
1.3 Markdown的HTML技巧
注释:<!-- 隐藏注释 -->
缩进:使用[ ]表示一个HTML缩进空格
管道符:使用[|]在表格中显示管道|
文本下划线:Some of these words <ins>will be underlined</ins>.
文本标记高亮居中:: I need to highlight these <mark>very important words</mark>.
文本居中:
HTML方式(已废弃):<center>This text is centered.</center>
CSS方式替代:<p style="text-align:center">Center this text</p>
字体颜色:
HTML方式:(已废弃):<font color="red">This text is red!</font>
CSS方式替代:<p style="color:blue">Make this text blue.</p>
警告:
> :warning: **警告:** 不要按那个大红按钮。
> :memo: **注释:** 日出很美。
> :bulb: **提示:** 别忘了欣赏生活中的小事。
HTML符号:
版权 (©) — ©
注册商标 (®) — ®
商标 (™) — ™
欧元 (€) — €
左箭头 (←) — ←
上箭头 (↑) — ↑
右箭头 (→) — →
下箭头 (↓) — ↓
度数 (°) — °
圆周率 (π) — π
链接到目标地址:
<a href="http://markdownguide.cn" target="_blank">新标签页打开</a>
指定图像大小:
<img src="image.png" width="200" height="100">
指定图像标题:
<figure>
<img src="/assets/images/albuquerque.jpg"
alt="Albuquerque, New Mexico">
<figcaption>图片标题</figcaption>
</figure>
插入视频:
[](https://www.youtube.com/watch?v=YOUTUBE-ID)
1.4 预览
1.4.1 常规语法:
标题:
# H1
## H2
### H3
#### H4
##### H5
###### H6
段落:
粗体文本:bold text
斜体文本:italicized text
行内代码:code
分隔线:—
引用块:> blockquote
超链接:[title](https://www.example.com)
插入图片:
有序列表
- First item
- Second item
- Third item
无序列表
- First item
- Second item
- Third item
1.4.2 扩展语法
上标:X<sup>2</sup>
下标:H<sub>2</sub>O
删除线:The world is flat.
脚注:
Here’s a sentence with a footnote. [^1]
[^1]: This is the footnote.
表格:
| Syntax | Description |
|---|---|
| Header | Title |
| Paragraph | Text |
代码块:
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}
任务列表:
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media
自动生成目录树:[TOC]
手动生成目录树:
- 一级标题
- [标题 1-1](#二级标题 1-1)
- [标题 1-2](#二级标题 1-2)
- 二级标题
- [标题 2-1](#二级标题 2-1)
- [标题 2-2](#二级标题 2-2)
- 一级标题
- [标题 1-1](#二级标题 1-1)
- [标题 1-2](#二级标题 1-2)
- 二级标题
- [标题 2-1](#二级标题 2-1)
- [标题 2-2](#二级标题 2-2)
1.4.3 Markdown的HTML技巧
注释:<!– 隐藏注释 –>
缩进:使用[ ]表示一个HTML缩进空格
管道符:使用[|]在表格中显示管道|
文本下划线:Some of these words <ins>will be underlined</ins>.
文本标记高亮居中:: I need to highlight these <mark>very important words</mark>.
文本居中:
HTML方式(已废弃):<center>This text is centered.</center>
CSS方式替代:<p style="text-align:center">Center this text</p>
字体颜色:
HTML方式:(已废弃):<font color="red">This text is red!</font>
CSS方式替代:<p style="color:blue">Make this text blue.</p>
警告:
:warning: 警告: 不要按那个大红按钮。
:memo: 注释: 日出很美。
:bulb: 提示: 别忘了欣赏生活中的小事。
HTML符号:
版权 (©) — ©
注册商标 (®) — ®
商标 (™) — ™
欧元 (€) — €
左箭头 (←) — ←
上箭头 (↑) — ↑
右箭头 (→) — →
下箭头 (↓) — ↓
度数 (°) — °
圆周率 (π) — π
链接到目标地址:
<a href="http://markdownguide.cn" target="_blank">新标签页打开</a>
指定图像大小:
<img src="image.png" width="200" height="100">
指定图像标题:
<figure>
<img src="/assets/images/albuquerque.jpg"
alt="Albuquerque, New Mexico">
<figcaption>图片标题</figcaption>
</figure>
插入视频:
[](https://www.youtube.com/watch?v=YOUTUBE-ID)