Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Markdown syntax collation

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Markdown syntax collation

Catalogue

6.1. Vertical bar | underscore-Writing method

6.2.htmltable writing method

5.1. No list required

5.2. Ordered list

5.3. Defined list

5.4. List indentation

5.5. A list containing paragraphs

4.1. On-page hyperlink

4.2. Link to the internal title of the article

3.1. In-line style:

3.2. Reference formula

3.3. Automatic connection

one。 Hierarchical catalogue

two。 Italic and bold

three。 Hyperlink

four。 Anchor point

five。 List

six。 Form

Description: the code in the syntax in this article is the Markdown syntax that needs to be written, and the display effect is the final generated page.

This syntax writing and testing environment: GitHub-style Markdown syntax using MarkdownPad2 on windows

one。 Hierarchical catalogue

Syntax: * General directory * first level directory * second level directory * third level directory

Description: hierarchical list generally only supports three-level list, the first level solid dot, the second level hollow dot, the third level is all solid square point. To implement a hierarchical list, enter 2 more spaces or one Tab for each lower level than the previous level, and no more than 3 spaces before the first level.

Display effect:

General catalogue

Secondary directory

Three-level directory

First-level directory

two。 Italic and bold

Syntax: * italic * * bold * * display effect:

Italic

Bold type

three。 Hyperlink

Markdown supports two forms of link syntax: inline and reference, which are commonly used. 3.1. Syntax: [open Baidu] (http://www.baidu.com) [Open Baidu] (http://www.baidu.com "Open Baidu")

Note: [] write the link text, () write the link address, () in the "" can specify the title attribute for the link, title attribute can be added or not. The effect of the title property is that the specified title text appears when you hover over the link. [link text] (link address "link title"). There is a space before the link address and the link title.

Display effect:

Open Baidu

Open Baidu

3.2. Reference type:

Reference hyperlinks are generally used in academic papers, or in another case, if a link is used in multiple places in the article, it is very good to use references to create links, which allows you to manage links uniformly.

Grammar: several websites that I often visit [Google] [1], [Baidu] [2], [51CTO] [3] and video watching sites [iqiyi] [4] all feel very good [websites] []. [1]: http://www.google.com "google" [2]: http://www.baidu.com "Baidu" [3]: http://www.51cto.com "51cto" [4]: http://www.aiqiyi.com "aiqiyi" [website]: http://www.qq.com display effect:

Several websites that I often visit, such as Google, Baidu, 51CTO and iqiyi, which watches videos, all feel good.

3.3. Automatic connection: syntax:

Note: Markdown supports a relatively short automatic link form to deal with URL and email address, as long as it is wrapped, Markdown will automatically convert it into a link. The link text of a general URL is the same as the link address.

Display effect:

Http://www.baidu.com/

Admin@baidu.com

four。 Anchor point

In the web page, the anchor point is actually a hyperlink within the page, that is, to link some elements within this document to achieve the jump in the current page. For example, I write down an anchor here, click back to the directory, and you can jump to the directory. Click on this section in the directory and you can jump over. And the footnotes for the next section. These are basically realized by anchor points.

Note: Markdown Extra only supports inserting anchor points after the title, otherwise it is invalid.

4.1. On-page hyperlink:

Syntax: # 1. The graded directory {# index} jumps to [title] {# index}

Note: insert the anchor {# tag} after the specified title you are going to jump to, and then write a link to the anchor elsewhere in the document. The GitHub-style Markdown syntax is used here, so the effect cannot be displayed properly. It is recommended to use the following 4.2. Link to the internal title of the article.

Display effect: 1. Hierarchical directory {# index}

Jump to 1. Hierarchical catalogue

Description: this is set in the graded directory of this article, otherwise the effect is not obvious.

4.2. Link to the internal title of the article:

Grammar: * [catalogue 1] (# 20) * [title 1] (# 21) * [title 2] (# 22) * [title 3] (# 23) * [title 4] (# 24) title 1 gently left, as I gently came; I gently waved goodbye to the clouds in the western sky. Title 2 as I come gently; I gently wave goodbye to the clouds of the western sky. Title 3 I gently wave to bid farewell to the clouds in the western sky. Title 4 Farewell to the clouds in the western sky. Display effect:

Catalogue

Heading 1

Heading 2

Heading 3

Title 4

Heading 1

Gently I go, as I gently come; I gently wave goodbye to the clouds of the western sky.

Heading 2

As I come gently; I wave gently to bid farewell to the clouds of the western sky.

Heading 3

I gently waved goodbye to the clouds of the western sky.

Title 4

Bid farewell to the clouds of the western sky.

five。 List

5.1. No list is required:

Use *, +,-to indicate an unordered list

Syntax:-unordered list 1 + unordered list 2 * unordered list 3 shows the effect:

Unordered list one

Unordered list two

Unordered list three

5.2. Ordered list:

The ordered list uses numbers followed by an English period.

Grammar: 1. Ordered list one 2. Ordered list two 3. Ordered list 3 shows the effect:

Ordered list one

Ordered list two

Ordered list three

5.3. Defined list:

Syntax: Markdown: lightweight text markup language that can be converted to formats such as html,pdf (with a visible colon and four invisible spaces on the left) code block 2: this is the definition of the code block (one visible colon and four invisible spaces on the left) the code block (eight invisible spaces on the left)

Description:

The definition list consists of nouns and explanations. Write the definition on one line, followed by the explanation on the line. Explanation: followed by an indentation (Tab)

Show the effect:

Markdown

Lightweight text markup language that can be converted to formats such as html,pdf (with a visible colon and four invisible spaces on the left)

Code Block 2

This is the definition of the code block (there is a visible colon and four invisible spaces on the left)

Code block (eight invisible spaces on the left)

5.4. List indentation:

Grammar: * gently I go, as I gently come; I gently wave goodbye to the clouds of the western sky. The golden willow by the river is the bride in the sunset, and the shadows in the waves ripple in my heart. The green grass on the soft mud is oily and oily at the bottom of the water; in the soft waves of the Kang River, I am willing to be a water plant! * the pool under the shade of elm is not a clear spring, but a rainbow in the sky; crushed among floating algae, precipitating rainbow-like dreams. But I can't sing, quiet is my farewell music; summer insects are silent for me, silence is Cambridge tonight! I left quietly, just as I came quietly; I waved my sleeves without taking away a cloud.

Note: the list item tag is usually placed on the far left, but it can also be indented, up to 3 spaces, followed by at least one space or tab.

Effect:

Gently I go, as I gently come; I gently wave goodbye to the clouds of the western sky.

The golden willow by the river is the bride in the sunset, and the shadows in the waves ripple in my heart.

The green grass on the soft mud is oily and oily at the bottom of the water; in the soft waves of the Kang River, I am willing to be a water plant!

The pool under the shade of elm is not a clear spring, but a rainbow in the sky, crushed among floating algae, precipitating rainbow-like dreams.

But I can't sing, quiet is my farewell music; summer insects are silent for me, silence is Cambridge tonight!

I left quietly, just as I came quietly; I waved my sleeves without taking away a cloud.

5.5. A list of paragraphs:

Grammar: * gently I go, as I gently come; I gently wave goodbye to the clouds of the western sky. The golden willow by the river is the bride in the sunset, and the shadows in the waves ripple in my heart. The green grass on the soft mud is oily and oily at the bottom of the water; in the soft waves of the Kang River, I am willing to be a water plant! The pool under the shade of elm is not a clear spring, but a rainbow in the sky, crushed among floating algae, precipitating rainbow-like dreams. Looking for dreams? Push a long pole to the greener grass; full of stars, sing in the beauty of the stars. But I can't sing, quiet is my farewell music; summer insects are silent for me, silence is Cambridge tonight! * I left quietly, just as I came quietly; I waved my sleeves without taking away a cloud.

Description:

List items can contain multiple paragraphs, and paragraphs under each item must be indented by 4 spaces or 1 tab (the display is consistent with the code): if you indent each line, you will look a lot better, and of course, again, if you are lazy, Markdown also allows

Effect:

Gently I go, as I gently come; I gently wave goodbye to the clouds of the western sky.

The golden willow by the river is the bride in the sunset, and the shadows in the waves ripple in my heart.

The green grass on the soft mud is oily and oily at the bottom of the water; in the soft waves of the Kang River, I am willing to be a water plant!

The pool under the shade of elm is not a clear spring, but a rainbow in the sky, crushed among floating algae, precipitating rainbow-like dreams.

Looking for dreams? Push a long pole to the greener grass; full of stars, sing in the beauty of the stars.

But I can't sing, quiet is my farewell music; summer insects are silent for me, silence is Cambridge tonight!

I left quietly, just as I came quietly; I waved my sleeves without taking away a cloud.

six。 Form

6.1. Vertical bar | underscore-write:

Syntax: | name | Sex | Age | nationality | Zhang San | male | 23 | China | | Xiaohong | female | 18 | China | | Tom | male | 46 | United States | presentation effect: name, sex, age, nationality, Zhang San male 23, Chinese Xiaohong Girl 18, Chinese Tom male 46 US.

6.2.htmltable is written:

Grammar: train departure time arrival time D110 10:22 11:00 show effect:

Train departure time arrival time D11010 purl 2211ver00

Explanation: it's a little strange here, why the space is so large, we can't find the reason at present, jump to the home page.

Because Markdown grammar is simple and clear, it is very good to organize documents every day, so we search on the Internet, after self-collation and verification, contribute it, so that netizens who need it can refer to it. If there are errors in the document, or if it is unclear, I hope to leave a message in order to correct it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report