1. 程式人生 > >markdown測試

markdown測試

str 末尾 for tro 標題 通過 github 中間 gif

這篇文章包含markdown語法基本的內容, 目的是放在自己的博客園上, 通過開發者控制臺快速選中,
從而自定義自己博客園markdown樣式.當然本文也可以當markdown語法學習之用.

在markdown裏強制換行是在末尾添加2個空格+1個回車.
在markdown裏可以使用 ?對特殊符號進行轉義.

1. 標題

語法

# This is an <h1> tag
## This is an <h2> tag
### This is an <h3> tag
#### This is an <h4> tag

實例

This is an h1 tag

This is an h2 tag

This is an h3 tag

This is an h4 tag

2. 強調和斜體

語法

*This text will be italic*
_This will also be italic_

**This text will be bold**
__This will also be bold__

(個人不喜歡2個下劃線中間包含的內容被斜體, 會和網址沖突, 我會在自定義博客園樣式中去除這個樣式.)

實例

This text will be italic
This will also be italic

This text will be bold


This will also be bold

3. 有序列表和無序列表

語法

* Item 1
* Item 2
* Item 3

1. Item 1
2. Item 2
3. Item 3

實例

  • Item 1
  • Item 2
  • Item 3
  1. Item 1
  2. Item 2
  3. Item 3

4. 圖片

語法

![img-name](img-url)

實例
技術分享圖片

5. 超鏈接

語法

[link-name](link-url)

實例

阿勝4K

6. 引用

語法

> 引用本意是引用別人的話之類  
> 但我個人喜歡把引用當成"註意"使用  

實例

If you please draw me a sheep!

不想當將軍的士兵, 不是好士兵.

7. 單行代碼

語法

`This is an inline code.`

實例

同樣的單行代碼, 我經常用來顯示特殊名詞

8. 多行代碼

語法

?```javascript
for (var i=0; i<100; i++) {
    console.log("hello world" + i);
}
?```

實例

for (var i=0; i<100; i++) {
    console.log("hello world" + i);
}

也可以通過縮進來顯示代碼, 下面是示例:

console.loe("Hello_World");

參考鏈接

https://guides.github.com/features/mastering-markdown/
https://help.github.com/articles/basic-writing-and-formatting-syntax/

markdown測試