Skip to content

Markdown basic syntax

1. Markdown title

  • Use = and - to mark first- and second-level headings
  • Use the # mark, and the first-level title corresponds to a #

2. Markdown paragraph format

  • paragraph Line breaks require two carriage returns
  • font
    italic text
    italic text Bold text Bold Text Bold italic text italic bold text
  • dividing line You can use more than three asterisks, minus signs, and underscores in a line to create a separator line. There can be no other things in the line. ***

    ---

  • strikethrough Add ~~ at both ends of the text~Google.com~

  • Underline Underline
  • footnote Format: [^famous text required] This is a text that requires footnotes 1

3. Markdown list

  • unordered list Can be marked with *, +, - * first item * Second item - first item - Second item + first item + Second item
  • ordered list Use numbers plus . to represent 1. first item 2. Second item
  • List nesting Add four spaces before sublist options 1. First * ele1 * ele2 2. second * ele3 * ele4

4. Markdown blockTo block a quote, use > at the beginning of a paragraph, followed by a space.

By using multiple >, multiple levels of nested references can be achieved

5. Markdown code* a code snippet

print()function * code block
Use to wrap a piece of code, you can specify or not specify the language int main()

```javascript
$(document).ready(function () {
    alert('RUNOOB');
});

  • [Link name]\(Link address\)
  • Advanced links
    • This link 1 is used as a URL variable [google][1]
    • This link uses runoob as the URL variable [Runoob][runoob] [1]:https://www.google.com[runoob]: http://www.runoob.com/

7. Markdown images

The image syntax format is as follows: alt attribute text alt attribute text

8. Markdown tablesWhen making a table, use | to separate different cells, and use - to separate the header and other rows.

|  表头   | 表头  |
|  ----  | ----  |
| 单元格  | 单元格 |
| 单元格  | 单元格 |
|Header|Header| | ---- | ---- | |cell|cell| |cell|cell|

  • Alignment * -: Set content and title bar to right alignment
    • :- Set content and title bar to left alignment
    • :-: Set the content and title bar to be centered
      | 左对齐 | 右对齐 | 居中对齐|
      | :-----| ----: | :----: |
      | 单元格 | 单元格 | 单元格 |
      | 单元格 | 单元格 | 单元格 |
      
left aligned Align right center alignment
cell cell cell
cell cell cell

REF

[1]. https://www.runoob.com/markdown


  1. footnote content