Markdown is a lightweight markup language with a simple formatting syntax, allowing people to focus more on the content itself rather than the formatting. It uses a plain text format that can be easily read and written, and can be combined with HTML. It can be exported to HTML, PDF, and the .md format itself. Due to its simplicity, efficiency, readability, and writability, Markdown is widely used on platforms like GitHub, Wikipedia, and Jianshu.

Don’t be intimidated by the terms “markup” and “language” - Markdown’s syntax is very simple, with less than ten common marker symbols. It is more than sufficient for daily writing and recording, and can be fully mastered in less than half an hour.

These less than ten marker symbols allow you to elegantly and immersively record, focusing on the content rather than getting bogged down in formatting, achieving the state of “a mind without dust, writing divinely inspired.”

John Gruber, the author of Markdown:

The primary design goal for Markdown’s formatting syntax is to be as readable as possible. The original idea was that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML conversion tools, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.

Headings

Add one # for each level of heading from h2 to h6.

## h2 Heading
### h3 Heading
#### h4 Heading
##### h5 Heading
###### h6 Heading

Comments

<!-- This is a comment (compatible with HTML) -->

Horizontal Line/Separator

(1)___ 3 consecutive underscores
(2)--- 3 consecutive hyphens
(3)*** 3 consecutive asterisks

Effect:




Emphasis (Bold, Italic, Strikethrough, etc.)

Bold

**Renders as bold 1**
__Renders as bold 2__

Effect:
Renders as bold 1
Renders as bold 2

Italic

*I am italicized*

Effect:
I am italicized

Strikethrough

~~This text is strikethrough.~~

Effect:
This text is strikethrough.

Paragraphs

To create a paragraph, separate a line or lines of text with a blank line. Do not indent paragraphs with spaces or tabs.

Blockquotes

To create a blockquote, add a > symbol before a paragraph.

> 1.xx  
> 2.xxx  
> 3.xxxxx  
> 4.xxxxxxxxxxxxx  

Effect:

1.xx
2.xxx
3.xxxxx
4.xxxxxxxxxxxxx

Blockquotes can contain multiple paragraphs. Add a > symbol before the blank line between paragraphs.

> Dorothy followed her through many of the beautiful rooms in her castle.
>
> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

Effect:

Dorothy followed her through many of the beautiful rooms in her castle.

The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

<https://gdhblog.com>  
<gdhblog@outlook.com>  
[Rickey's blog](https://gdhblog.com)

Effect:
https://gdhblog.com
gdhblog@outlook.com
Rickey’s blog

When you hover your mouse over the link, there will be a tooltip with the description.

[Rickey's blog](https://gdhblog.com "I am the link description.")

Effect:
Rickey’s blog

Images

The syntax for images is similar to links, but with an exclamation point at the beginning.

![Qingdao travel](https://gdhblog.com/blog-imgs/bk/2024-qingdao-21.jpg)

Effect:
Qingdao travel

Lists

Organize multiple items into ordered or unordered lists.

Unordered List


- First item(Type 1)
- Second item(Type 1)
- Third item(Type 1)


* First item(Type 2)
* Second item(Type 2)
* Third item(Type 2)


+ First item(Type 3)
+ Second item(Type 3)
+ Third item(Type 3)

Effect:

  • First item(Type 1)

  • Second item(Type 1)

  • Third item(Type 1)

  • First item(Type 2)

  • Second item(Type 2)

  • Third item(Type 2)

  • First item(Type 3)

  • Second item(Type 3)

  • Third item(Type 3)

搭配使用(缩进2个空格即可)

- Fruits
  - Apples # 2 spaces before the dash
  - Watermelon 
  - Cherries
- Balls
  - Basketball
  - Soccer
  - Table Tennis

Effect:

  • Fruits
    • Apples # 2 spaces before the dash
    • Watermelon
    • Cherries
  • Balls
    • Basketball
    • Soccer
    • Table Tennis

Ordered List

To create an ordered list, add a number followed by a period before each list item. The numbers do not need to be in mathematical order, but the list should start with the number 1.

1. First item(Type 1)
2. Second item(Type 1)
3. Third item(Type 1)


1. First item(Type 2)
1. Second item(Type 2)
1. Third item(Type 2)


1. First item(Type 3)
6. Second item(Type 3)
100. Third item(Type 3)

Effect:

  1. First item(Type 1)
  2. Second item(Type 1)
  3. Third item(Type 1)

  1. First item(Type 2)
  2. Second item(Type 2)
  3. Third item(Type 2)

  1. First item(Type 3)
  2. Second item(Type 3)
  3. Third item(Type 3)

Code Syntax

Inline Code/Word/Phrase

To represent a word or phrase as code, enclose it in backticks (`).

`Javascript`
`Python`
`Dynamics CRM`

Effect:
Javascript
Python
Dynamics CRM

Code Blocks

Use ``` to generate a code block with a language attribute.


    ``` javascript
    function Person(firstName, lastName){
    this.firstName =  firstName;
    this.lastName = lastName;
    }
    var Saad = new Person("Saad", "Mousliki");

    ```

Effect:

function Person(firstName, lastName){
    this.firstName =  firstName;
    this.lastName = lastName;
}
var Saad = new Person("Saad", "Mousliki");

Line Breaks

To create a line break (<br>), add two or more spaces at the end of a line and then press Enter.

床前明月光,(There are 2 Spaces here)
疑似地上霜。(There are 2 Spaces here)
举头望明月,(There are 2 Spaces here)
低头思故乡。(There are 2 Spaces here)

Effect:

床前明月光,
疑似地上霜。
举头望明月,
低头思故乡。

Tables

To add a table, use three or more hyphens (—) to create the header for each column, and use pipes (|) to separate each column.

Basic Usage of Tables

| No. | User name |
| --- | --- |
| 1 | Rickey |
| 2 | Bob |
| 3 | Peter |

Effect:

No.User name
1Rickey
2Bob
3Peter

Using hyphens and pipes to create tables can be tedious. To improve efficiency, you can try using the Markdown Tables Generator graphical interface to build the table, and then copy the generated Markdown formatted text into your document.

Advanced Usage

Alignment

You can align the text in columns by adding colons (:) to the left, right, or both sides of the hyphens in the header row.

| Left-Aligned | Centered | Right-Aligned |
| :--- | :---: | ---: |
| 1 | 小明 | 12345678 |
| 2 | 小红 | 22344133 |
| 3 | 小李 | 98726666 |

Effect:

Left-AlignedCenteredRight-Aligned
1小明12345678
2小红22344133
3小李98726666

Formatting Text in Tables

You can set text formatting within tables. For example, you can add links, code (only words or phrases within backticks (`), not code blocks), and emphasis.

You cannot add headings, block quotes, lists, horizontal rules, images, or HTML tags.

Task Lists

To create a task list, add a hyphen (-) and a space before the task list item, followed by brackets [ ]. To select a checkbox, add an x between the brackets [x].

- [x] Complete homework
- [ ] Cook dinner
- [ ] Clean the room
- [ ] Read 10 minutes of extracurricular books

Effect:

  • Complete homework
  • Cook dinner
  • Clean the room
  • Read 10 minutes of extracurricular books

Footnotes

Footnotes allow you to add comments and references without cluttering the main body of the document. When you create a footnote, a superscript-numbered link appears at the location where the footnote reference is added.

To create a footnote reference, add a caret symbol and an identifier in brackets (1). The identifier can be a number or a word, but it cannot contain spaces or tabs. The identifier only associates the footnote reference with the footnote itself - the footnotes are numbered sequentially in the output.

Add the footnote content in brackets with a caret and a number, followed by a colon and the text (1: This is a footnote). You don’t necessarily have to add the footnotes at the end of the document. You can place them anywhere except within lists, quotes, and tables.

九月九日忆山东兄弟[^1]

独在异乡为异客[^2] ,

每逢佳节倍思亲[^3] 。

遥知兄弟登高处[^4] ,

遍插茱萸少一人[^5] 。

Effect:

《九月九日忆山东兄弟1

独在异乡为异客2

每逢佳节倍思亲3

遥知兄弟登高处4

遍插茱萸少一人5


  1. 九月九日:即重阳节。古以九为阳数,故曰重阳。忆:想念。山东:王维本太原祁人,后迁居于蒲(今山西永济),蒲州在函谷关与华山以东,所以称山东。 ↩︎ ↩︎ ↩︎

  2. 异乡:他乡,外乡。 为异客:作他乡的客人。 ↩︎

  3. 佳节:美好的节日 ↩︎

  4. 登高:古有重阳节登高的风俗 ↩︎

  5. 茱萸(zhū yú):即草决明,一名越椒,芳香植物。古时人们认为重阳节插戴茱萸可以避灾克邪。 ↩︎