Markdown tutorial
1. First look at an introduction to Markdown
-
Markdown is a lightweight markup language that allows people to write documents in a plain text format that is easy to read and write.
-
The Markdown language was created in 2004 by John Gruber (English: John Gruber).
-
Documents written in Markdown can export documents in HTML, Word, images, PDF, Epub and other formats.
-
The suffix of the document written in Markdown is .md, .markdown。
2. Markdown application
-
Markdown can be used to write e-books, such as Gitbook.
-
Markdown is often used as blog posts
-
All current mainstream project hosting platforms such as: GitHub GitLab Gitee And other platforms support the writing and publishing of Markdown
Basic syntax of Markdown
title
# 一级标题
## 二级标题
### 三级标题
#### 四级标题
##### 五级标题
###### 六级标题
paragraph
- Add two spaces at the end to wrap
- Or use blank lines directly to wrap
Hello
Markdown !!!
Font
*斜体文本*
_斜体文本_
**粗体文本**
__粗体文本__
***粗斜体文本***
___粗斜体文本___
effect
*斜体文本*
_斜体文本_
**粗体文本**
__粗体文本__
***粗斜体文本***
___粗斜体文本___
Font bold
- Use
****
four * or wrap a piece of text can be
**我是加粗文字**
**The effect after bolding**
List
Markdown supports ordered and unordered lists.
Unordered lists use asterisk ( ), plus sign ( + ), or minus sign ( - *) as list markers:
* 第一项
* 第二项
* 第三项
+ 第一项
+ 第二项
+ 第三项
- 第一项
- 第二项
- 第三项
effect
Ordered list
use digital Plus. To form an ordered list, there must beSpaceTo form a list
1. 第一项
2. 第一项
3. 第一项
List nesting
- Can be under the ordered or unordered listindentationAdd
-
to constitute a nested list
1. 第一项:
- 第一项嵌套的第一个元素
- 第一项嵌套的第二个元素
2. 第二项:
- 第二项嵌套的第一个元素
- 第二项嵌套的第二个元素
Block author
- Use> space text to compose the application
> 作者:yufire © [email protected]
effect
Author: yufire © [email protected]
Block nesting
- Use multiple> for nested blocks
> 一层
> > 二层
> > > 三层
effect
layer
Second floor
Three layers
Code block
`printf()` 函数
effect
printf()
function
Code block
You can also use ``` to wrap a piece of code and specify a language (or not specify):
```java
// 代码内容
```
effect
public static void main(String[] args){
System.out.println("Markdown 让学习更简单!!");
}
link
[链接名称](链接地址)
或者
<链接地址>
effect
image
![alt 属性文本](图片地址)
![img](https://yufire.oss-cn-shanghai.aliyuncs.com/image/af40aa97-079e-4337-a03e-0a59d5b809501589356586985.png)
form
- The Markdown table uses | to separate different cells, and - to separate the header and other rows.
The syntax format is as follows:
| 表头 | 表头 |
| ---- | ---- |
| 单元格 | 单元格 |
| 单元格 | 单元格 |
Alignment
We can set the alignment of the table:
- -: Set the content and title bar to be aligned to the right.
- : -Set the content and title bar to be aligned to the left.
- :-: Set the content and title bar to be aligned in the center.
Examples are as follows:
| 左对齐 | 右对齐 | 居中对齐 |
| :-----| ----: | :----: |
| 单元格 | 单元格 | 单元格 |
| 单元格 | 单元格 | 单元格 |