1. 段落好啰、標(biāo)題厂抽、區(qū)塊代碼
一級(jí)標(biāo)題
二級(jí)標(biāo)題
三級(jí)標(biāo)題
四級(jí)標(biāo)題
五級(jí)標(biāo)題
六級(jí)標(biāo)題
代碼:
#一級(jí)標(biāo)題
##二級(jí)標(biāo)題
###三級(jí)標(biāo)題
####四級(jí)標(biāo)題
#####五級(jí)標(biāo)題
2.修辭和強(qiáng)調(diào)
Markdown 使用星號(hào)和底線來(lái)標(biāo)記需要強(qiáng)調(diào)的區(qū)段总处。
例如:
Some of these words are emphasized.
Some of these words are emphasized also.
Use two asterisks for strong emphasis.
Or, if you prefer, use two underscores instead.
代碼
Some of these words *are emphasized*.
Some of these words _are emphasized also_.
Use two asterisks for **strong emphasis**.
Or, if you prefer, __use two underscores instead__.
3.列表
**無(wú)序列表使用星號(hào)俊柔、加號(hào)和減號(hào)來(lái)做為列表的項(xiàng)目標(biāo)記君丁,這些符號(hào)是都可以使用的枫夺; **
星號(hào):
- Candy.
- Gum.
- Booze.
加號(hào):
- Candy.
- Gum.
- Booze.
和減號(hào)
- Candy.
- Gum.
- Booze.
* Candy.
* Gum.
* Booze.
+ Candy.
+ Gum.
+ Booze.
- Candy.
- Gum.
- Booze.
有序的列表則是使用一般的數(shù)字接著一個(gè)英文句點(diǎn)作為項(xiàng)目標(biāo)記:
- Red
- Green
- Blue
1. Red
2. Green
3. Blue
4.鏈接
Markdown 支援兩種形式的鏈接語(yǔ)法: 行內(nèi) 和 參考 兩種形式,兩種都是使用角括號(hào)來(lái)把文字轉(zhuǎn)成鏈接绘闷。
行內(nèi)形式是直接在后面用括號(hào)直接接上鏈接:
This is an example link.
This is an [example link](http://example.com/).
你也可以選擇性的加上 title 屬性:
This is an example link.
This is an [example link](http://example.com/ "With a Title").
參考形式的鏈接讓你可以為鏈接定一個(gè)名稱(chēng)橡庞,之后你可以在文件的其他地方定義該鏈接的內(nèi)容:
I get 10 times more traffic from [Google][1] than from
[Yahoo][2] or [MSN][3].
[1]: http://google.com/ "Google"
[2]: http://search.yahoo.com/ "Yahoo Search"
[3]: http://search.msn.com/ "MSN Search"
I get 10 times more traffic from [Google][1] than from
[Yahoo][2] or [MSN][3].
[1]: http://google.com/ "Google"
[2]: http://search.yahoo.com/ "Yahoo Search"
[3]: http://search.msn.com/ "MSN Search"
title 屬性是選擇性的较坛,鏈接名稱(chēng)可以用字母、數(shù)字和空格扒最,但是不分大小寫(xiě):
I start my morning with a cup of coffee and
[The New York Times][NY Times].
[ny times]: http://www.nytimes.com/
I start my morning with a cup of coffee and
[The New York Times][NY Times].
[ny times]: http://www.nytimes.com/
5.圖片
圖片的語(yǔ)法和鏈接很像丑勤。
- 行內(nèi)形式(title 是選擇性的):
![Fight.JPG](http://upload-images.jianshu.io/upload_images/41733-
7d9418830b8c2506.JPG 'Fight For Dream')
- 參考形式:
![Geek.jpg][1]
[1]:http://upload-images.jianshu.io/upload_images/41733-6e5461773b550597.jpg "極客范"
![Geek.jpg][1]
[1]:http://upload-images.jianshu.io/upload_images/41733-
6e5461773b550597.jpg "極客范"
6.代碼
在一般的段落文字中,你可以使用反引號(hào) ` 來(lái)標(biāo)記代碼區(qū)段吧趣,區(qū)段內(nèi)的 &法竞、< 和 > 都會(huì)被自動(dòng)的轉(zhuǎn)換成 HTML 實(shí)體,這項(xiàng)特性讓你可以很容易的在代碼區(qū)段內(nèi)插入 HTML 碼:
I strongly recommend against using any <blink>
tags.
I wish SmartyPants used named entities like —
instead of decimal-encoded entites like —
.
如果要建立一個(gè)已經(jīng)格式化好的代碼區(qū)塊强挫,只要每行都縮進(jìn) 4 個(gè)空格或是一個(gè) tab 就可以了岔霸,而 &、< 和 > 也一樣會(huì)自動(dòng)轉(zhuǎn)成 HTML 實(shí)體俯渤。
7.其他
>
表示引用
---
表示分界線
Markdown 可以利用反斜杠來(lái)插入一些在語(yǔ)法中有其它意義的符號(hào)秉剑,例如:如果你想要用星號(hào)加在文字旁邊的方式來(lái)做出強(qiáng)調(diào)效果(但不用標(biāo)簽),你可以在星號(hào)的前面加上反斜杠:**
*literal asterisks*
\*literal asterisks\*