brief introduction
Markdown is a lightweight markup language, which uses concise syntax instead of typesetting to focus on codewords. Its goal is to make it easy to read and write and become a writing language suitable for the network. At the same time, markdown supports embedding html tags.
<u> Note: Markdown is marked with #, +, * and other symbols. The symbol must be followed by at least one space to be effective</ u>
Common syntax of Markdown
title
The Markdown header supports two forms:
1. Mark with # a
Add 1 ~ 6 # at the beginning of the title to represent the primary title, secondary title Six level title
# Primary title ## Secondary title ### Tertiary title ##### Four level title ###### Five level title ###### Six level title
2. Mark with = and -
Under the title, add any = to represent the primary title and - to represent the secondary title
Primary title ====== Secondary title ----------
The effects are as follows:
Primary title
Secondary title
Tertiary title
Four level title
Five level title
Six level title
list
Markdown supports ordered and unordered lists.
Unordered lists use -, + and * as list Tags:
- Red - Green - Blue * Red * Green * Blue + Red + Green + Blue
The effects are as follows:
- Red
- Green
- Blue
If there is a sequence table, use numbers and English periods To indicate:
1. Red 2. Green 3. Blue
The effects are as follows:
- Red
- Green
- Blue
quote
References are represented by > and support multi-level references, titles, lists, code blocks, split lines and other general syntax.
Common quotation:
> This is a quote //There is a space after '>' > > This is the code block form of the reference //There are 5 spaces after '>' > > Code example: > protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } > Primary reference > > Secondary reference > > > Tertiary reference > #### This is a four level title > > 1. This is the first row of list items > 2. This is the second row of list items
The effects are as follows:
This is a quote
This is the code block form of the reference //There are 5 spaces after '>'
Code example:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); }
Primary reference
Secondary reference
Tertiary reference
This is a four level title
- This is the first row of list items
- This is the second row of list items
Here are the split lines
emphasize
Two * or - for bold, one * or - for italic, ~ ~ for delete.
**Bold text** perhaps __Bold text__ *Italic text* perhaps_Italic text_ ~~Delete text~~
The effects are as follows:
Bold text or bold text
Italic text or italic text
Delete text
Pictures and links
The syntax of pictures and links is very similar. The difference is in one! number. Both formats:
Picture:![]()  Link:[]() [Link text](Link address)
Links are divided into inline, reference and automatic links:
This is an inline link:[ConnorLin's Blog](http://connorlin.github.io). This is a reference link:[ConnorLin's Blog][url],among url Is a link marker, which can be placed anywhere in the text. [url]: http://connorlin.github.io/ "ConnorLin's Blog" The link tag format is:[Link tag text]: Link address link title(Negligible) This is automatic linking: use directly`<>`Enclose<http://connorlin.github.io> This is a picture:![][avatar] [avatar]: https://connorlin.github.io/images/avatar.jpg
The effects are as follows:
This is an inline link: ConnorLin's Blog.
This is a reference link: ConnorLin's Blog Where url is a link tag, which can be placed anywhere in the text.
This is an automatic link: use < > directly http://connorlin.github.io
This is a picture:

code
Code is divided into inline code and code block.
-
In line codes are identified by "code" and can be embedded in text
-
The code block is identified by 4 spaces or ` ` `
```
Here is the code
``` -
Highlight the code syntax and add a space and language name after ` ` `
```Language
//Note that there are spaces in front of the language
Here is the code
```
For example:
This is inline code`onCreate(Bundle savedInstanceState)`Examples. This is code block and syntax highlighting: ``` java // Note that there are spaces in front of java protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } ```
The effects are as follows:
This is an example of the in-line code onCreate(Bundle savedInstanceState).
This is code block and syntax highlighting:
// Note that there are spaces in front of java protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); }
form
Table alignment format
- Left:----
- Center: ----: or-----
- Right: ---:
example:
|title|title|title| |:---|:---:|---:| |Left test text|Center test text|Right test text| |Left test text1|Center test text2|Right test Text3| |Left test text11|Center test text22|Right test text33| |Left test text111|Centered test text222|Right test text333|
The effects are as follows:
title | title | title |
---|---|---|
Left test text | Center test text | Right test text |
Left test text1 | Center test text2 | Right test Text3 |
Left test text11 | Center test text22 | Right test text33 |
Left test text111 | Centered test text222 | Right test text333 |
Separation line
Use more than three *, -, in a row_ To create a separator. There can be nothing else in the line. You can also insert spaces between symbols.
*** --- ___ * * *
The effect is a split line:
Line feed
Add two spaces at the end of the line and enter to break the line:
This is a line break followed by two spaces
The effects are as follows:
This is a line followed by two spaces
Line feed
Footnotes (notes)
Use [^] to define footnotes:
This is an example of a footnote[^1] [^1]: Here are the footnotes
The effects are as follows:
This is an example of a footnote [1]
Commonly used Html tags for Markdown
typeface
<font face="Microsoft YaHei " color="red" size="6">Font and font color and size</font> <font color="#0000ff "> font color < / font >
The effects are as follows:
< font face = "Microsoft YaHei" color = "red" size = "6" > font and font color and size < / font >
< font color = "#0000ff" > font color < / font >
Line feed
use html label`<br/>`<br/>Line feed
The effects are as follows:
Use html tags < br / >
Line feed
text alignment
<p align="left">Left text</p> <p align="center">Centered text</p> <p align="right">Right text</p>
The effects are as follows:
< p align = "left" > left text</p>
< p align = "center" > center text</p>
< p align = "right" > right text</p>
Underline
<u>Underlined text</u>
The effects are as follows:
<u> Underlined text < / u >
By Connor Lin
Link: https://www.jianshu.com/p/82e730892d42
Source: Jianshu
The copyright belongs to the author. For commercial reprint, please contact the author for authorization, and for non-commercial reprint, please indicate the source.