. MD is the basic common writing syntax for markdown files.

Source: Internet
Author: User
Tags html tags split first row
This article is reproduced from: Lingyun Wings

Body:

1, the title of several ways:

The first type:

The front with #, followed by text, respectively, the H1-H6, the above can be seen, only to H6, and H1 below will have a horizontal line, note, #号后面有空格

The second type:

This approach appears to represent only the first and two levels of headings, and the number of = and-is not limited, as long as it is greater than one.

The third type:

Here the title support H1-h6, in order to reduce the length, I stole a lazy, only write the first two, this is better understood, the equivalent of the label closed, note, the title and the # number to have a space

So since 3 kinds of can be used, is it possible to mix it. I tried, it is possible, but in order to make the page label uniformity, not recommended mixed use, recommended the use of the first, relatively concise, comprehensive

In order to understand the principle, I deliberately search online to write markdown tools, and found that the actual is the final conversion of these tags into HTML tags, as shown:

Online address please see here: Markdown Online editor (just want to see the rationale behind the conversion, no advertising suspicion)

2. List

As we all know, the list is divided into sequential and unordered lists, which show the 2 types of lists directly below:

As you can see, the unordered list can be created with a *, +,-to-do, with an online editor, which is actually converted into a ul>li, so use whichever you want.

It is relatively simple to have a sequence list, only in this way, note that the point behind the number can only be a point in English, especially note that the sequence number of the list is based on the number of the first row list, for example:

The first group was originally 3 2 1 reverse, but the reality of 3 4 5, followed by a set of serial numbers is chaotic, but still show 3 4 5, this must be noted

3. Block references

For example, if you want to make a description of a certain part of the content or quote a certain word, you can use this statement

Unordered list Below is the reference, can have a variety of purposes, see your needs, usage is to add a > in front of the statement, note that the right angle bracket in English, note the space

Reference because it is a block, in theory should be what content can be put, such as: title, list, reference and so on, look at the following image:

Change the above code a little bit, all with the reference tag, it becomes a large reference, there is also a reference inside the reference, there is no other way to refer to nested references.

As can be seen above, you want to nest a layer of reference in the last reference, just add a, theoretically can be unlimited nesting, I will not be so much, note: Multilayer nested > is not required to be together, as long as in one line can be, the middle allows a space, but in order to look good, or the typesetting well

4, gorgeous split line

The split line can be represented by at least 3 symbols of the 3 symbols: *-_ (asterisk, minus, bottom line), note at least 3, and do not need to be contiguous, with spaces

It should be understood, but for the layout of the code good-looking, you have to make the rules, the previous useful to the asterisk, it is recommended to use a minus

5. Links

Support 2 ways to link: inline and parametric, regardless of which, the link text is marked with [square brackets].

The above figure shows that the inline link format is: The linked text is placed in [], the link address is placed in the subsequent (), extrapolate, the list of frequently appearing links should be written like this:

Links can also be with the title property, as if only with the title, with no other attributes, note that the link is empty after the address of a lattice, and then enclose in quotation marks

This is the inline style, the formula of how to write:

This is good to understand, that is, the link as a parameter, suitable for more than the use of the same link of the scene, note the parameters of the corresponding relationship, parameter definitions, these 3 kinds of writing can:

[foo]: http://example.com/"Optional Title Here"

[foo]: http://example.com/' Optional Title here '

[foo]: http://example.com/(Optional Title here)

Also support this writing, if you do not want to confuse the words:

[foo]:

In fact, there is an implicit link to the wording, but I think that kind of writing is not intuitive, so do not write, often used on the above 2 kinds, if you want to know the implicit link, you can see my article finally released the reference address

6. Pictures

Pictures are also available in 2 ways: inline and parametric,

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.