MarkDown 语法

Part Ⅰ. Standard Markdown

Strong and Emphasize
emphasize strong
emphasize strong
Links and Email
Inline:

An example
Reference-style labels (titles are optional):

An example. Then, anywhere
else in the doc, define the link:

Email:

An email example@example.com link.
Images
Inline (titles are optional):

alt text
alt text

Reference-style:

alt text
alt text

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.
    Inline Code
    <code> spans are delimited
    by backticks.

You can include literal backticks
like `this`.
Block Code
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:




Hard Line Breaks
End a line with two or more spaces:

Roses are red,
Violets are blue.
Part Ⅱ. Extra Syntax

Footnotes
Footnotes work mostly like reference-style links. A footnote is made of two things: a marker in the text that will become a superscript number; a footnote definition that will be placed in a list of footnotes at the end of the document. A footnote looks like this:

That's some text with a footnote.[1]

Strikethrough
Fenced Code Blocks
Start with a line containing 3 or more backtick characters, and ends with the first line with the same number of backtick:

Fenced code blocks are like Stardard
Markdown’s regular code blocks, except that
they’re not indented and instead rely on a
start and end fence lines to delimit the code
block.

Tables
A simple table looks like this:

First Header Second Header Third Header
Content Cell Content Cell Content Cell
Content Cell Content Cell Content Cell

If you wish, you can add a leading and tailing pipe to each line of the table:

First Header Second Header Third Header
Content Cell Content Cell Content Cell
Content Cell Content Cell Content Cell

Specify alignement for each column by adding colons to separator lines:

First Header Second Header Third Header
Left Center Right
Left Center Right

Anchor
You can also add an anchor for an element such as Headers, then you can link to this anchor anywhere, when you click that link in the Preview view, it'll auto scroll to the place of the destination anchor.

For example below is a normal h2 Header:

This is an example

Now we add an anchor for it, here we use the name "anchor1" for the anchor, of course you can use any name you want.

This is an example

If you want to link to this anchor, simply write like this:

Click this link in the Preview view will auto scroll to the place of the destination anchor.


  1. And that's the footnote.
    Strikethrough
    Wrap with 2 tilde ~ characters:

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容