Markdown syntax basics

The first use of markdown syntax is documented in this article

1. The title

Headings are done by adding different numbers of # to the front of the text

### ### ##Copy the code

Primary title

The secondary title

Level 3 title

2. Blank lines and text newlines

Empty lines: & have spent (Remember to include semicolons) Text newline: "Add two Spaces at the end of the text and press enter." If multiple blank lines need to be entered, the above two lines need to be combinedCopy the code

3. Text format

** Text bold ** * text italics * ~~ text deletion line ~~Copy the code

Text bold text italic text deletion line

List of 4.

The ordered list can be added by adding 1.2.3.4 before the text, and the secondary structure can be ordered by adding a space or TAB before the text

1. Ordered list 1 1. Nested ordered list 2 1. Nested ordered list 3 2. Nested ordered list 3 3Copy the code
  1. Ordered list 1
  2. Ordered list 1
  3. Ordered list 1
    1. Nested ordered list 2
      1. Nested ordered list 3
      2. Nested ordered list 3
      3. Nested ordered list 3

Unordered lists Unordered lists can be constructed by adding * or – to the front of the text, the same way as secondary structures

  • Unordered list
  • Unordered list
  • Unordered list
    • Nested listing 2
      • Nested listing 23

5. Table

The first line can write the title, and the second line uses a special identifier to distinguish the table header from the table content. By default, the table text is left aligned. If you want to center the text, you can use the second line identifier to control it.

| | left-aligned title right-aligned headlines | | centered alignment | : -- -- -- -- -- - | -- -- -- -- -- - : | : -- -- -- -- -- - : | | the | | secondary text essay slightly longer text | | a little bit longer text | the | | secondary text essayCopy the code
Left-align title Right align title Center the title
This essay Secondary text Slightly longer text
Slightly longer text This essay Secondary text

6. Quote text

To reference text, you simply add a > symbol to the front of the text, and the result is text with a background color and a left border.

> references text contentCopy the code

Reference text content

7. The divider

Secant writing is very simple, only need to use three or more *** or -.

* * * * * * * * -- -- -- -- -- -- -- -- --Copy the code




Code 8.

Single line 'alert(666)' code block actually does not have ' 'there are no parentheses around it, because non-escapes don't show up here so we add a small wide ('') language type (e.g. Function test(){console.log('this is a test')} (' ')Copy the code

Single-line alert(666) code block

    function test(){
        console.log('this is a test')}Copy the code

9. Web links

[Description of link](address of link e.g. https://www.baidu.com/ "mouse pointer description ")Copy the code

Link description

Picture 10.

The basic syntax for quoting an image is as follows: [Alt](URL title), Alt is the text below the image, title is the description of the image, that is, the text will be displayed after the mouse is placed on it, and URL is the path of the image.

1, network pictures:! [Image description](the address of the network picture HTTP "mouse pointer description ")Copy the code

This article refer to

  • Nuggets markdown grammar reference
  • Markdown basic syntax