Markdown basic syntax
Markdown is a plain text markup language. Through simple markup syntax, it can make ordinary text content have a certain format.
advantage:
1. Because it is pure text, the same editing effect can be obtained wherever Markdown is supported, which can let the author get rid of the trouble of typesetting and concentrate on writing.
2. Simple operation. For example: WYSIWYG marks a title when editing. Select the content first, and then click the title button on the navigation bar to select several levels of titles. There are three steps. Markdown only needs to add # before the title
Disadvantages:
1. You need to remember some grammar (of course, it's very simple. Learn it in five minutes).
2. Some platforms do not support Markdown editing mode.
1, Title
Add # in front of the text you want to set as the title
One # is the primary title, the other # is the secondary title, and so on. Six level titles are supported.
Note: the standard grammar usually writes words after # followed by a space. It seems that a simple book can do without a space.
# This is the first level title ## This is the secondary title ### This is a three-level title #### This is a four level title ##### This is a five level title ###### This is a six level title
effect:
This is the first level title
This is the secondary title
This is a three-level title
This is a four level title
This is a five level title
This is a six level title
2, Typeface
-
Bold
The text to be bold is wrapped with two * marks on the left and right respectively -
Italics
The text to be tilted shall be wrapped with an * sign on the left and right respectively -
Italic bold
The text to be tilted and bold shall be wrapped with three * marks on the left and right respectively -
Delete line
The left and right of the text to be underlined are wrapped with two ~ ~ marks respectively
**This is bold text** *This is slanted text*` ***This is bold italic text*** ~~This is the text with a strikethrough~~
effect:
This is bold text
This is slanted text`
This is bold italic text
This is the text with a strikethrough
3, Quote
Add > before the referenced text. References can also be nested, such as adding two > > and three > > >
n
It seems that it can be added all the time, but it's useless
>This is the quoted content >>This is the quoted content >>>>>>>>>>This is the quoted content
effect:
This is the quoted content
This is the quoted content
This is the quoted content
4, Split line
Three or more - or * can be.
--- ---- *** *****
effect
5, Picture
Syntax:
 picture alt Is the text displayed below the picture, which is equivalent to the explanation of the picture content. picture title Is the title of the picture and the content displayed when the mouse moves over the picture. title You can add it or not

effect:
6, Hyperlinks
Syntax:
[Hyperlink name](Hyperlink address "Hyperlinks title") title You can add it or not
Example:
[Jian Shu](http://jianshu.com) [Baidu](http://baidu.com)
Note: Markdown syntax does not support opening links in new pages. It seems that Jane's book has been processed, which is OK. Other platforms may not work. If you want to open it in a new page, you can use the a tag of html language instead.
<a href="Hyperlink address" target="_blank">Hyperlink name</a> Example <a href="https://www.jianshu. com/u/1f5ac0cf6a8b" target="_ Blank "> short book</a>
7, List
Unordered list
Syntax:
The unordered list can be either - + * or
- List content + List content * List content be careful:- + * There should be a space between and the content
- List content
- List content
- List content
Note: - + * there should be a space between it and the content
Ordered list
Syntax:
Digital dot
1. List content 2. List content 3. List content Note: there should be a space between the serial number and the content
- List content
- List content
- List content
Note: there should be a space between the serial number and the content
List nesting
Just type three spaces between the upper level and the lower level
- Primary unordered content
- Secondary unordered content
- Secondary unordered content
- First order content
- Secondary ordered content
8, Forms
Syntax:
Header|Header|Header ---|:--:|---: content|content|content content|content|content The second line splits the header and content. - Just one. For alignment, add a few more Text is left by default -Plus on both sides: indicates that the text is centered -Right plus: indicates that the text is on the right Note: the native grammar should be used on both sides | wrap up. Omitted here
Example:
full name|skill|Ranking --|:--:|--: Liu Bei|cry|eldest brother Guan Yu|hit|second elder brother Fei Zhang|scold|Third brother
full name | skill | Ranking |
---|---|---|
Liu Bei | cry | eldest brother |
Guan Yu | hit | second elder brother |
Fei Zhang | scold | Third brother |
9, Code
Syntax:
Single line code: the codes are enclosed in an inverted quotation mark
`Code content`
Code block: the code is enclosed in three backquotes, and the backquotes on both sides occupy a separate line
(```) code... code... code... (```)
The effects are as follows:
Single line code:
create database hero;
Code block
function fun(){ echo "This is a very awesome code"; } fun();
10, Flow chart
```mermaid flowchat st=>start: start op=>operation: My Operation cond=>condition: Yes or No? e=>end st->op->cond cond(yes)->e cond(no)->op &```