Welcome to Markdown
第一次学习Markdown,总结一些常用的方法。
- Introducing Markdown
- Tutorial
- 1. Headings
- 2. TOC
- 3. Citation (A single line)
- 4. Citation (Multiple lines)
- 5. Nesting
- 6. Code block in a single line
- 7. Code block in lines
- 8. Self-defining the color of code
- 9. Insertion of links
- 10. Insertion of photos
- 11. Insertion of videos
- 12. Ordered list
- 13. Unsorted list
- 14. Nesting list
- 15. Nesting list with code
- 16. LaTeX
- 17. style of fonts
- 18. To be continue
Introducing Markdown
Markdown is a plain text formatting syntax designed to be converted to HTML. Markdown is popularly used as format for readme files, … or in text editors for the quick creation of rich text documents. - Wikipedia
Tutorial
1. Headings
1 | # h1 |
1 | h1 |
2. TOC
Generating a catalogue based on the given headings
1 | <!-- toc --> |
3. Citation (A single line)
Citing the code or sentences by using >
1 | > hello world! |
Example:
hello world!
4. Citation (Multiple lines)
1 | > hello world! > hello world! |
Example:
hello world!
hello world!
hello world!
5. Nesting
1 | > aaaaaaaaa |
Example:
aaaaaaaaa
bbbbbbbbb
cccccccccc
6. Code block in a single line
using ` to make the code block in one line
1 | the inner part of this bracket all in a single line |
Example:
(< div>
< div></div>
< div></div>
< div></div>
< /div>
)
7. Code block in lines
using 3 ` to make the code blocks in lines
(Tab) making the structures of code clear
Example:
1
2
3
4<div>
<div></div>
<div></div>
</div>
8. Self-defining the color of code
Example:
1
2
3
4
5var num = 0;
for (var i = 0; i < 5; i++) {
num+=i;
}
console.log(num);
9. Insertion of links
1 | 百度一下 |
Example:百度一下
百度1
10. Insertion of photos
1 | (1)photos in Internet ![圣人惠](https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1587239535004&di=a2c85429b04af968f770863353ee9fab&imgtype=0&src=http%3A%2F%2Fi0.hdslb.com%2Fbfs%2Farticle%2F3704f527edd7fa1c7af02772780d8aeb8b0e1b42.jpg) |
Example:
(1)
(2)
11. Insertion of videos
1 | <video id="video" controls="" preload="none" poster="http://media.w3.org/2010/05/sintel/poster.png"> |
Example:
12. Ordered list
There is a space behind the dot
1 | 1. one |
Example:
- one
- two
- three
13. Unsorted list
1 | * one |
Example:
- one
- two
- three
14. Nesting list
The function of * and - are the same.
1 | 1. one |
Example:
- one
- one-1
- two-2
- two
- two-1
- two-2
15. Nesting list with code
changing a line + 2 TAB
1 | * one |
Example:
one
int a = 10;
16. LaTeX
17. style of fonts
italic
1 | (1) *斜体* (2) <i>斜体</i> (3)_斜体_ |
Example:
(1) 斜体 (2) 斜体 (3)斜体
boldface
1 | **加粗** |
Example:
加粗
italic + boldface
1 | (1) ***加粗+斜体*** (2) **_加粗+斜体_** |
Example:
(1) 加粗+斜体 (2) 加粗+斜体
delated line
1 | ~~删除线~~ |
Example:删除线
keyboard
1 | <kbd>Ctrl</kbd> |
Example:
Ctrl