Your attitude, not your ap|
2021-10-20 17:00阅读: 418评论: 3推荐: 0

Markdown 语法

Markdown 语法



基础语法

这些是 John Gruber 的原始设计文档中列出的元素。所有 Markdown 应用程序都支持这些元素。

元素 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) ![alt text](image.jpg)

图片支持 jpg、png、gif、svg 等图片格式,其中 svg 文件仅可在微信公众平台中使用


扩展语法

这些元素通过添加额外的功能扩展了基本语法。但是,并非所有 Markdown 应用程序都支持这些元素。

元素 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
定义列表(Definition List) term
: definition
删除线(Strikethrough) ~~The world is flat.~~
任务列表(Task List) - [x] Write the press release
- [ ] Update the website
- [ ] Contact the media

代码块支持以下语言种类:

bash
clojure,cpp,cs,css
dart,dockerfile, diff
erlang
go,gradle,groovy
haskell
java,javascript,json,julia
kotlin
lisp,lua
makefile,markdown,matlab
objectivec
perl,php,python
r,ruby,rust
scala,shell,sql,swift
tex,typescript
verilog,vhdl
xml
yaml

其他语法

元素 Markdown 语法
注音符号
横屏滑动幻灯片 <![](url),![](url)>


Via

本文作者:Librarookie

本文链接:https://www.cnblogs.com/librarookie/p/15429658.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   Librarookie  阅读(418)  评论(3编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起
  1. 1 无名之辈 陈雪燃
  2. 2 白鸽乌鸦相爱的戏码 潘成(皮卡潘)
  3. 3 姑娘别哭泣 可可可可可啊
  4. 4 年少有为 李荣浩
  5. 5 稻香 (Live) 周杰伦,徐林,Will Jay
  6. 6 404 not found REOL
白鸽乌鸦相爱的戏码 - 潘成(皮卡潘)
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.