简介
Markdown 是一种轻量级 标记语言,它允许人们使用易读易写的纯文本格式编写文档,Markdown 文件的后缀名便是 “.md”。
常用语法
元素 | Markdown 语法 | 备注 |
---|---|---|
标题 | # H1 ## H2 ###### H6 |
1. 标题ID,可用于链接定位:# H1 {#headid} |
粗体 | **text** |
- |
斜体 | *text* |
- |
换行 | <br /> |
- |
分隔线 | --- |
- |
删除线 | ~~The world is flat.~~ |
- |
转义字符 | \ |
- |
标记 | ==marked== => ==marked== |
- |
引用块 | > text |
- |
缩略词 | The HTML specification *[HTML]: Hyper Text Markup Language |
- |
上下标 | 上标:30^th^ => 30^th^下标: H~2~O => H |
- |
脚注 | Here's a sentence with a footnote. [^1] [^1]: This is the footnote. |
- |
链接 | [text](https://www.example.com#headid "title") [text](#headid "title") |
1. 引用类型:[hobbit-hole][1] [1]: https://www.example.com "title" 2. 网址,Email地址: <https://markdown.com.cn> <fake@example.com> |
图片 |  [](https://www.example.com#headid) |
- |
列表 | 有序列表:1. First item 2. Second item 无序列表 - First item - Second item |
在列表中嵌套其他元素: 缩进一个制表符,上下各空一行 1. 引用块: * Here's the second list item. > A blockquote would look great below the second list item. * And here's the third list item. 2. 代码块: * Here's the second list item. ```json {} ``` * And here's the third list item. |
表格 | |Syntax|Description| |---:|:---:| |>|Title| |Header|Title| |^|Title| |
- |
代码 | 代码行:` code ` 或 `` code `` 代码块: ```json code ``` |
- |
任务列表 | - [x] Write the press release - [] Write the press release - [] Write the press release |
- |
使用 Emoji 表情 | 1. 复制和粘贴表情符号:❤️ 2. 使用表情符号简码: :cupid: => :cupid: |
1. 表情符号仓库:https://emojipedia.org/zh 2. 表情符号简码列表:https://gist.github.com/rxaviers/7360908 |