0%

Get to know Markdown

Welcome to Markdown

第一次学习Markdown,总结一些常用的方法。

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
2
3
4
5
6
7
8
9
10
# h1
## h2
### h3
#### h4
##### h5
###### h6
####### h7 // 错误代码
######## h8 // 错误代码
######### h9 // 错误代码
########## h10 // 错误代码
1
2
3
4
h1
===
h2
---

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
2
3
> hello world!           > hello world!
hello world! or > hello world!
hello world! > hello world!

Example:

hello world!
hello world!
hello world!

5. Nesting

1
2
3
> aaaaaaaaa
>> bbbbbbbbb
>>> cccccccccc

Example:

aaaaaaaaa

bbbbbbbbb

cccccccccc

6. Code block in a single line

using ` to make the code block in one line

1
2
3
4
5
6
7
8
the inner part of this bracket all in a single line
(`
< div>
< div></div>
< div></div>
< div></div>
< /div>
`)

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
5
var num = 0;
for (var i = 0; i < 5; i++) {
num+=i;
}
console.log(num);

9. Insertion of links

1
2
  百度一下
[百度1](http://www.baidu.com/)

Example:百度一下
百度1

10. Insertion of photos

1
2
(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)
(2)photos in local disk ![saya](/images/6.png)

Example:
(1)
圣人惠
(2)壁纸

11. Insertion of videos

1
2
3
4
5
6
<video id="video" controls="" preload="none" poster="http://media.w3.org/2010/05/sintel/poster.png">
<source id="mp4" src="http://media.w3.org/2010/05/sintel/trailer.mp4" type="video/mp4">
<source id="webm" src="http://media.w3.org/2010/05/sintel/trailer.webm" type="video/webm">
<source id="ogv" src="http://media.w3.org/2010/05/sintel/trailer.ogv" type="video/ogg">
<p>Your user agent does not support the HTML5 Video element.</p>
</video>

Example:

Your user agent does not support the HTML5 Video element.


12. Ordered list

There is a space behind the dot

1
2
3
1. one
2. two
3. three

Example:

  1. one
  2. two
  3. three

13. Unsorted list

1
2
3
* one
* two
* three

Example:

  • one
  • two
  • three

14. Nesting list

The function of * and - are the same.

1
2
3
4
5
6
1. one
1. one-1
2. two-2
2. two
* two-1
- two-2

Example:

  1. one
    1. one-1
    2. two-2
  2. two
    • two-1
    • two-2

15. Nesting list with code

changing a line + 2 TAB

1
2
3
* one

int a = 10;

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

18. To be continue

-------------感谢您的阅读(Thanks for your reading)-------------

欢迎关注我的其它发布渠道