An Introduction to Markdown
Markdown is a lightweight “markup language”. It has many advantages and is widely used by more and more writing enthusiasts and writers.
This article is an introduction to the most commonly used syntax of Markdown, and aims to provide an instruction for users to quickly get started with Markdown.
Header
Section titled “Header”In Markdown, text starting with # at the beginning of a line is defined as a heading, such as:
# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6Example:
Header 1
Header 2
Header 3
Header 4
Header 5
Header 6
The header is up to six levels. It is recommended to add a space after #.
In Markdown, the list display only needs to add - or * before the text to become an unordered list, and add numbers such as 1., 2., 3. to become a list Sequence listing. Likewise, it is recommended to add a space between the list symbol and the text.
Unordered list:
- Item 1
- Item 2
- Item 3Example:
- Item 1
- Item 2
- Item 3
Ordered list:
1. Item 1
2. Item 2
3. Item 3Example:
- Item 1
- Item 2
- Item 3
If you want to indicate that a piece of text is a quote, just precede it with a greater-than sign > . If you have used Email or BBS in the early years, you must be familiar with this syntax.
> This is a quoteExample:
This is a quote
Quotes can contain multiple lines:
This is a quote 1
This is a quote 2
This is a quote 3
Hyperlink
Section titled “Hyperlink”To insert a hyperlink in a document, you can use the following syntax:
[link text](URL address)Example:
[WonderPen](https://www.tominlab.com/wonderpen) will be rendered to WonderPen.
The syntax for inserting a picture is similar to the syntax for inserting a link, except that there is an exclamation mark ! in front of it.
Bold and Italics
Section titled “Bold and Italics”Text enclosed with ** is rendered bold, and text enclosed with * is rendered italic. as follows:
**bold**
*italic*Example:
**bold** → bold
*italic* → italic
The syntax of the table is relatively complicated. Generally speaking, the table is divided into three parts: Header, Alignment, and Table Content. For example the following example:
|Left Align|Center Align|Right Align|
|---|:---:|---:|
|AAA|abc|10|
|BBB|33|5|Will be rendered as the following table:
| Left Align | Center Align | Right Align |
|---|---|---|
| AAA | abc | 10 |
| BBB | 33 | 5 |
Dividing Line
Section titled “Dividing Line”If you want to insert a dividing line on the page, you can start a new line and enter three * or -, as follows:
***Or
---Example:
*** will be rendered as:
--- will be rendered as:
Summary
Section titled “Summary”At this point, you have learned the most common syntax of Markdown, and you can start using Markdown for daily writing. To learn more, continue to read more about it.