# Markdown 語法 Cheat Sheet ## 標題 ``` # H1 Title ## H2 Title ### H3 Title #### H4 Title ##### H5 Title ###### H6 Title ``` # H1 Title ## H2 Title ### H3 Title #### H4 Title ##### H5 Title ###### H6 Title ``` H1 Title ==== H2 Title ---- ``` H1 Title ==== H2 Title ---- ## 字體強調 ``` 我喜歡**粗一點**的 我喜歡*斜一點*的 我喜歡***又粗又斜***的 我不喜歡~小小~的 這個是~~刪除線~~ ``` 我喜歡**粗一點**的 我喜歡*斜一點*的 我喜歡***又粗又斜***的 我不喜歡~小小~的 這個是~~刪除線~~ ## 引用 ``` > 這是單行引用 > 這是 > > 多行引用 > 這個是 >> 裡面的引用 > > 外面的引用 > ## 在引用裡面寫MarkDown > > - Revenue was off the chart. > - Profits were higher than ever. > > *Everything* is going according to **plan**. > 簡報做不完qq[time=Sun, Sep 24, 2023 10:43 PM] > Hello[name=yuuto-0226] > 有顏色的引用[color=#9be236] ``` > 這是單行引用 > 這是 > > 多行引用 > 這個是 >> 裡面的引用 > > 外面的引用 > ## 在引用裡面寫MarkDown > > - Revenue was off the chart. > - Profits were higher than ever. > > *Everything* is going according to **plan**. > 簡報做不完qq[time=Sun, Sep 24, 2023 10:43 PM] > Hello![name=yuuto-0226] > 有顏色的引用[color=#9be236] ## 清單 ``` 1. First item 2. Second item 3. Third item 4. Fourth item - First item - Second item - Third item - Fourth item * First item * Second item * Third item * Fourth item + First item + Second item + Third item + Fourth item - First item - Second item - Third item - Indented item - Indented item - Fourth item ``` 1. First item 2. Second item 3. Third item 4. Fourth item - First item - Second item - Third item - Fourth item * First item * Second item * Third item * Fourth item + First item + Second item + Third item + Fourth item - First item - Second item - Third item - Indented item - Indented item - Fourth item ## 核選方塊 ``` - [ ] First item - [x] Second item ``` - [ ] First item - [x] Second item ## 程式區塊 這邊要看原始碼會比較快... `這是單行程式區塊,不會有語法高亮`,但有人把他當`標籤`用 ```cpp // 這是多行程式區塊,支持與法高亮 #include <iostream> int main(){ std::cout<<"Hello, World!"<<std::endl; return 0; } ``` ## 有時候會有用的橫線 ``` --- *** ``` --- *** ## 超連結 ``` 這是一般的使用方式: [這是通往Google的神祕通道](https://google.com) 這是引用的使用方式: [這是通往社團網站的神祕通道][ssc] [ssc]:https://ttussc.yuto26.com 可以用角括號快速生成連結: <https://ttu.edu.tw> 但HackMD可以幫你直接換: https://ttu.edu.tw ``` 這是一般的使用方式: [這是通往Google的神祕通道](https://google.com) 這是引用的使用方式: [這是通往社團網站的神祕通道][ssc] [ssc]:https://ttussc.github.io 可以用角括號快速生成連結: <https://ttu.edu.tw> 但HackMD可以幫你直接換: https://ttu.edu.tw 特殊用法: ```md [TOC] ``` [TOC] ## 圖片 ``` ![](<url> =<width>x<height>) ![](https://ttussc.github.io/11th/img/DSC_9627.jpg) ![](https://ttussc.github.io/11th/img/DSC_9627.jpg =300x) ![](https://ttussc.github.io/11th/img/DSC_9627.jpg =x300) ``` ![](https://ttussc.github.io/11th/img/DSC_9627.jpg) ![](https://ttussc.github.io/11th/img/DSC_9627.jpg =300x) ![](https://ttussc.github.io/11th/img/DSC_9627.jpg =x300) ## 表格 ``` | 這是 | 表格 | 的 | 標題 | | :- | -: | :-: | - | | 靠左邊站 | 靠右邊站 | 靠中間站 | 沒特別定就靠左 | ``` | 這是 | 表格 | 的 | 標題 | | :- | -: | :-: | - | | 靠左邊站 | 靠右邊站 | 靠中間站 | 沒特別定就靠左 | ## 跳脫字元 跳脫字元前面要補一個反斜線才可以正常顯示 | Character | Name | | - | - | | \\ | backslash| | \` | backtick (see also escaping backticks in code)| | \* | asterisk | | \_ | underscore | | \{ \} | curly braces | | \[ \] | brackets | | \< \> | angle brackets | | \( \) | parentheses | | \# | pound sign | | \+ | plus sign | | \- | minus sign (hyphen) | | \. | dot | | \! | exclamation mark | | \| | pipe (see also escaping pipe in tables) | ## HTML 支援 ``` <h1>H1 大標題支援</h1> <em>斜咖</em><br> <strong>粗的</strong><br> <ul> <li>first item</li> <li>second item</li> </ul> <ol> <li>first item</li> <li>second item</li> </ol> ``` <h1>H1 大標題支援</h1> <em>斜咖</em><br> <strong>粗的</strong><br> <ul> <li>first item</li> <li>second item</li> </ul> <ol> <li>first item</li> <li>second item</li> </ol> <style> h1:before{ color: #909090; content: "# "; } h2:before{ color: #909090; content: "## "; } h3:before{ color: #909090; content: "### "; } h4:before{ color: #909090; content: "#### "; } s>span:before{ content: "~~"; } s>span:after{ content: "~~"; } sub>span:before{ content: "~"; } sub>span:after{ content: "~"; } strong>span:before{ content: "**"; } strong>span:after{ content: "**"; } em>span:before{ content: "*"; } em>span:after{ content: "*"; } mark>span{ box-shadow: inset 0 -10px 0 0 #B8E1FF; } /*覆蓋掉原本螢光筆設定*/ .markdown-body .mark,.markdown-body mark{ background-color: #ffffff; } </style>