Markdown syntax cheatsheet

Source: Internet
Author: User
ArticleDirectory
    • Phrase emphasis
    • Links
    • Images
    • Headers
    • Lists
    • Blockquotes
    • Code Spans
    • Preformatted code blocks
    • Horizontal rules
    • Manual line breaks
    • Reference

Since the markdown syntax is used to write readme on GitHub, the quick reference is recorded here.

 

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.

 

Reference

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.