Markdown syntax cheatsheet

來源:互聯網
上載者:User
文章目錄
  • Phrase Emphasis
  • Links
  • Images
  • Headers
  • Lists
  • Blockquotes
  • Code Spans
  • Preformatted Code Blocks
  • Horizontal Rules
  • Manual Line Breaks
  • 參考

由於在github上寫readme都是用的markdown文法,這裡記錄下速成參考

 

Phrase Emphasis

*italic* 
**bold** 
_italic_ 
__bold__ 
Links

Inline:


An [example](http://url.com/ "Title") 

Reference-style labels (titles are optional):


An [example][id]. Then, anywhere else in the doc, define the link: 
[id]: http://example.com/ "Title" 
Images

Inline (titles are optional):


![alt text](/path/img.jpg "Title") 

Reference-style:


![alt text][id] [id]: /url/to/img.jpg "Title" 
Headers

Setext-style:


Header 1
========
Header 2
--------


atx-style (closing #'s are optional):


# Header 1 # 
## Header 2 ##
###### Header 6
Lists

Ordered, without paragraphs:

1. Foo
2. Bar

Unordered, with paragraphs:


* A list item. With multiple paragraphs. 
* Bar

You can nest them:


* Abacus 
* answer
* Bubbles
  1. bunk
  2. bupkis
* BELITTLER
  3. burper
* Cunning


Blockquotes

> Email-style angle brackets 
> are used for blockquotes.
> > And, they can be nested.
> #### Headers in blockquotes
>
> * You can quote a list.
> * Etc.
Code Spans

`<code>` spans are delimited by backticks. You can include literal backticks like `` `this` ``. 
Preformatted Code Blocks

Indent every line of a code block by at least 4 spaces or 1 tab.


     This is a normal paragraph. This is a preformatted code block. 
Horizontal Rules

Three or more dashes or asterisks:


--- 
* * *
- - - -
Manual Line Breaks

End a line with two or more spaces:


Roses are red, Violets are blue.

 

參考

http://daringfireball.net/projects/markdown/syntax

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.