Markdown 常用語法
簡介
Markdown是一種輕量級的標記語言,可用于將格式設(shè)置元素添加到純文本文檔中。Markdown 由John Gruber于2004年創(chuàng)建耸三,如今已成為世界上最受歡迎的標記語言之一澎埠。
Markdown 是一種輕量級標記語言,它允許人們使用易讀易寫的純文本格式編寫文檔溶弟。
Markdown 語言在 2004 由約翰·格魯伯(英語:John Gruber)創(chuàng)建女淑。
Markdown 編寫的文檔可以導(dǎo)出 HTML 、Word辜御、圖像鸭你、PDF、Epub 等多種格式的文檔擒权。
Markdown 編寫的文檔后綴為 .md, .markdown
基本語法
標題
# H1
## H2
### H3
粗體
**bold text**
bold 粗體
斜體
*斜體*
斜體
塊引用
>塊引用
塊引用
有序列表
1. First item
2. Second item
3. Third item
First item
Second item
Third item
First item
Second item
-
Third item
- Indented item
- Indented item
Fourth item
無序列表
- First item
- Second item
- Third item
First item
Second item
Third item
First item
Second item
-
Third item
- Indented item
- Indented item
Fourth item
代碼
`code`
code
水平線
要創(chuàng)建水平線***袱巨,請單獨在一行上使用三個或更多的星號(),破折號(---)或下劃線(___)碳抄。
網(wǎng)址和電子郵件地址
要將URL或電子郵件地址快速轉(zhuǎn)換為鏈接愉老,請將其括在尖括號中。
<https://www.test.com>
<test@example.com>
超鏈接
[title](https://www.example.com)
圖片

擴展語法
表格
| Syntax | Description |
| :----------- | :-----------: |
| Header | Title |
| Paragraph | Text |
Syntax | Description |
---|---|
Header | Title |
Paragraph | Text |
代碼塊
Markdown基本語法允許您通過將行縮進四個空格或一個制表符來創(chuàng)建代碼塊剖效。如果發(fā)現(xiàn)不方便嫉入,請嘗試使用受保護的代碼塊。根據(jù)Markdown處理器或編輯器的不同璧尸,您將在代碼塊之前和之后的行上使用三個刻度線(```)或三個波浪號(~~~)
{
"firstName": "james",
"lastName": "hu",
"age": 18
}
腳注
Here's a sentence with a footnote. [^1]
[^1]: This is the footnote.
Here's a sentence with a footnote. [1]
標題ID
### My Great Heading {#custom-id}
My Great Heading {#custom-id}
自定義列表
term
: definition
term
: definition
刪除線
~~The world is flat.~~
The world is flat.
任務(wù)列表
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media
- Write the press release
- Update the website
- Contact the media
轉(zhuǎn)義字符
字符 | 名稱 |
---|---|
|反斜杠 | |
` | 刻度線 |
* | 星號 |
_ | 下劃線 |
{} | 大括號 |
[] | 中括號 |
() | 括號 |
# | 井號 |
+ | 加號 |
- | 減號(連字符) |
. | 點 |
! | 感嘆號 |
管道 |
-
This is the footnote. ?