Simple usage of Markdown

Simple usage of Markdown

Here I recommend an online Markdown editor. This online editor can not only edit, but also provides us with a variety of Markdown writing methods (more comprehensive and practical than the one given in this article). This article only shows what can be used directly in the blog garden. In part, the unsupported part is not displayed, but full attribute support is provided in the online editor. The editor URL is: https://www.mdeditor.com/
For Markdown, the separation of paragraphs can be found in Add two spaces at the end of the line and press Enter, or by adding a blank line between paragraphs. Here only for tips, not for demonstration.
Let's talk briefly about the simple use of Markdown, first of all, the use of headings, and Marddown provides us with a total of six levels of headings, the usage is as follows:

# 一级标题
## 二级标题
### 三级标题
#### 四级标题
##### 五级标题
###### 六级标题

Corresponding effect display:

First level heading

Secondary heading

Title 3

Title 4

Title 5
Title VI

Simple processing of text in Markdown, such as adding strikethrough and underline, as well as bold and italics, specific usage is as follows:

~~删除线~~  

<u>下划线</u>  

*斜体文本*  

_斜体文本_  

**粗体文本**  

__粗体文本__  

***粗体斜文本***  

___粗体斜文本___

Corresponding effect display:
strikethrough

Underline

Italic text

Italic text

Bold text

Bold text

Bold italic text

Bold italic text

The use of lists in Markdown, you can use *, + and-to define an unordered list, use numbers to define an ordered list, and the list structure can be nested, specific usage is as follows

* 列表值
* 列表值

+ 列表值
+ 列表值

- 列表值
- 列表值

1. 列表值
    - 嵌套列表
    - 嵌套列表
2. 列表值
    + 嵌套列表
    + 嵌套列表
3. 列表值
    * 嵌套列表
    * 嵌套列表
4. 列表值
    1. 嵌套列表
    2. 嵌套列表

Corresponding effect display:

  • List value
  • List value
  • List value
  • List value
  • List value
  • List value
  1. List value
    • Nested list
    • Nested list
  2. List value
    • Nested list
    • Nested list
  3. List value
    • Nested list
    • Nested list
  4. List value
    1. Nested list
    2. Nested list

In the use of blocks in Markdown, multiple layers can be nested between blocks, not just the four layers shown here. For each nested layer, you only need to add one more ">" on the basis of the previous layer. The specific usage is as follows:

>区块第一层  
>>区块第二层  
>>>区块第三层  
>>>>区块第四层

Corresponding display effect:

Block first layer

Block second layer

Block third layer

Block fourth layer

The use of code blocks in Markdown, here provide two implementations, you can use the overall indentation method or use three backticks to surround the code block (this mode can specify the code block type, you can also specify), for the code statement , You can use SLR quotes to surround the code body, the specific usage is as follows (there is an extra "" in the statement, you can delete it when you actually use it):

`printf()`函数

    public class Test{
        public static void main(String[] args){
            System.out.println("Hello World!");
        }
    } 
```java
public class Test{
    public static void main(String[] args){
        System.out.println("Hello World!");
    }
}
\``` 

Corresponding display effect:
printf()function

public class Test{
    public static void main(String[] args){
        System.out.println("Hello World!");
    }
} 
public class Test{
    public static void main(String[] args){
        System.out.println("Hello World!");
    }
}

The use of tables in Markdown, where:-,-: and:-: respectively indicate left alignment, right alignment and center display, let us take a look at the specific usage:

|表头|表头|表头|
|---:|:---:|:---|
|单元格|单元格|单元格|
|值|值|值|

Corresponding effect display:

Header Header Header
Cell Cell Cell
value value value

For some Markdown keywords, you can use the escape character "" to escape and display. The following characters are supported:

\   反斜线
`   反引号
*   星号
_   下划线
{}  花括号
[]  方括号
()  小括号
#   井字号
+   加号
-   减号
.   英文句点
!   感叹号
具体使用方法如下:
\\    \`    \*    \_    \{\}    \[\]    \(\)    \#    \+    \-    \.    \!

Corresponding display effect:
\ `* _ {} [] () # +-.!

Finally, let's take a look at the use of inserting footnotes, introducing hyperlinks, and introducing URL images in Markdown. Since Markdown does not support adjusting the size of the image, HTML tags are used to assist in this function. The specific usage is as follows:

[超链接-百度](www.baidu.com)  
脚注 [^tip]
[^tip]: 脚注信息  
<img src="https://mango-cnblogs.oss-cn-beijing.aliyuncs.com/homeTopImg/%E8%83%8C%E6%99%AF%E5%9B%BE.jpg" width="20%"/>
![alt 图片](https://mango-cnblogs.oss-cn-beijing.aliyuncs.com/homeTopImg/%E8%83%8C%E6%99%AF%E5%9B%BE.jpg "夕阳西下")

Corresponding effect display:
Hyperlink-Baidu
Footnote [1]


  1. Footnotes information

    alt picture ↩︎

Guess you like

Origin www.cnblogs.com/Mango-Tree/p/Markdown.html