美文网首页
Markdown 备忘录

Markdown 备忘录

作者: 6ea566508d0d | 来源:发表于2018-07-28 19:54 被阅读0次

基础语法

基础语法是John Gruber的原始设计文档中概述的元素。
所有Markdown应用程序都支持这些元素。

元素 Markdown 语法
标题 # H1
## H2
### H3
粗体 **bold text**
斜体 *italicized text*
引用 > blockquote
代码 `code`
水平线 ---
有序列表 1. First item
2. Second item
3. Third item
无序列表 - First item
- Second item
- Third item
链接 [title](https://www.example.com)
图片 ![alt text](image.jpg)

扩展语法

扩展语法通过添加其他功能扩展了基本语法。
并非所有Markdown应用程序都支持这些元素。

元素 Markdown 语法
表格 | Syntax | Description |
| - | - |
| Header | Title |
代码块 ```
{
 "firstName": "John",
 "lastName": "Smith",
 "age": 25
}
```
脚注 Here's a sentence with a footnote. [^1]
[^1]: This is the footnote.
标题 ID ### My Great Heading {#custom-id}
删除线 ~~The world is flat.~~
任务列表 - [x] Write the press release
- [ ] Update the website
- [ ] Contact the media

转义字符

可以用反斜线“\”进行转义的字符

名称 字符
感叹号 !
大括号 {}
中括号 []
小括号 ()
反斜线 \
下划线 _
刻度 `
井号 #
星号 *
加号 +
减号 -
.

不可以用反斜线“\”进行转义的字符

名称 字符 实体名称 实体编号
空格    
小于 < &lt; &#60;
大于 > &gt; &#62;
双引号 " &quot; &#34;
单引号 ' &apos; &#39;
和号 & &amp; &#38;
竖线 | &#124;
波浪线 ~ &#126;

更多参考:
Markdown Guide/Cheat Sheet

相关文章

网友评论

      本文标题:Markdown 备忘录

      本文链接:https://www.haomeiwen.com/subject/fdhamftx.html