Markdown 強調語法#
透過將文本設置為粗體或斜體來強調其重要性。
粗體(Bold)#
要加粗文本,請在單詞或短語的前後各添加兩個星號(asterisks)或下劃線(underscores)。如需加粗一個單詞或短語的中間部分用以表示強調的話,請在要加粗部分的兩側各添加兩個星號(asterisks)。
Markdown 語法 | HTML | 預覽效果 |
---|---|---|
I just love **bold text**. | I just love <strong>bold text</strong>. | I just love bold text. |
I just love __bold text__. | I just love <strong>bold text</strong>. | I just love bold text. |
Love**is**bold | Love<strong>is</strong>bold | Love is bold |
粗體(Bold)用法最佳實踐#
Markdown 應用程序在如何處理單詞或短語中間的下劃線上並不一致。為兼容考慮,在單詞或短語中間部分加粗的話,請使用星號(asterisks)。
✅ Do this | ❌ Don't do this |
---|---|
Love**is**bold | Love__is__bold |
斜體(Italic)#
要用斜體顯示文本,請在單詞或短語前後添加一個星號(asterisk)或下劃線(underscore)。要斜體突出單詞的中間部分,請在字母前後各添加一個星號,中間不要帶空格。
Markdown 語法 | HTML | 預覽效果 |
---|---|---|
This text is ***really important***. | This text is <strong><em>really important</em></strong>. | This text is really important. |
This text is ___really important___. | This text is <strong><em>really important</em></strong>. | This text is really important. |
This text is __*really important*__. | This text is <strong><em>really important</em></strong>. | This text is really important. |
This text is **_really important_**. | This text is <strong><em>really important</em></strong>. | This text is really important. |
This is really***very***important text. | This is really<strong><em>very</em></strong>important text. | This is really very important text. |
粗體(Bold)和斜體(Italic)用法的最佳實踐#
Markdown 應用程序在處理單詞或短語中間添加的下劃線上並不一致。為了實現兼容性,請使用星號將單詞或短語的中間部分加粗並以斜體顯示,以示重要。
✅ Do this | ❌ Don't do this |
---|---|
This is really***very***important text. | This is really___very___important text. |