Markdown 教程 - 语法速查表
Markdown 是一种轻量级标记语言,它允许我们使用易读易写的纯文本格式编写文档,Markdown 文件后缀名为.md。语法速查表提供了所有 Markdown 语法元素的基本解释。如果你想了解某些语法元素的更多信息,请参阅更详细的 基本语法 和 扩展语法。
基本语法
这些是 John Gruber 的原始设计文档中列出的元素。所有 Markdown 应用程序都支持这些元素。
标题Heading
# H1
## H2
### H3
粗体Bold
**bold text**
斜体Italic
*italicized text*
引用块Blockquote
> blockquote
有序列表Ordered List
1. First item
2. Second item
3. Third item
无序列表Unordered List
- First item
- Second item
- Third item
代码Code
`code`
分隔线Horizontal Rule
---
链接Link
[title](https://www.example.com)
图片Image

扩展语法
这些元素通过添加额外的功能扩展了基本语法。但是,并非所有 Markdown 应用程序都支持这些元素。
表格Table
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |
代码块Fenced Code Block
```
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}
```
脚注Footnote
Here's a sentence with a footnote. [^1]
[^1]: This is the footnote.
标题编号Heading ID
### My Great Heading {#custom-id}
定义列表Definition List
term
: definition
删除线Strikethrough
~~The world is flat.~~
任务列表Task List
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media