Markdown introduction

Markdown is a lightweight markup language that lets authors focus on writing without paying attention to style.

title

When writing with Markdown, you only need to add 『#』 in front of the text to create a first-level title. Similarly, to create a secondary title, a third-level title, etc., only need to increase the number of 『#』, Markdown supports a total of six titles. As follows:

1
2
3
4
5
6
# First level heading
## Secondary title
### Three-level title
#### Four-level title
##### Five-level title
###### Six-level title

Reference

The Markdown tag block reference is similar to the email referenced by 『>』, just add 『>』 at the top of the first line of the entire paragraph.
Block references can be nested, as long as different numbers of 『>』 are added according to the level:

1
2
3
4
5
> This is the first level reference.
>
> > This is the second level reference.
>
> Now go back to the first level reference.

example

This is the first level reference.

This is the second level reference.

Now go back to the first level reference.

Other Markdown syntaxes, including titles, lists, code blocks, etc., can also be used within the referenced block:

1
2
3
4
5
6
7
> ## This is a title.
> 1. This is the first line of list items.
> 2. This is the second line of list items.
>
> Give some example code:
>
> return shell_exec(`echo $input | $markdown_script`);

example

  1. This is the first line of list items.
  2. This is the second line of list items.

Give some example code:

return shell_exec(echo $input | $markdown_script);

List

The list item tag is usually placed on the far left, and the item tag is followed by a character space.
Unordered list: use an asterisk, plus or minus sign as a list mark

1
2
3
- Red
- Green
- Blue

example

  • Red
  • Green
  • Blue

Ordered list: use numbers followed by an English period

1
2
3
1. Red
2. Green
3. Blue

  1. Red
  2. Green
  3. Blue
    If you want to put a reference in the list item, then 『>』 needs to be indented:
    1
    2
    3
    4
    *  My Porject:
    > code1
    > code2
    > code3

example

  • My Porject:

    code1
    code2
    code3

Agent list: Indicates whether the list is checked or not (note: there must be spaces before and after [ ])

1
2
- [ ] not selected
- [x] tick

example

  • not selected
  • tick

Code

Just wrap your code block between “`, you don’t need to mark the code block by endless indentation. In a fenced code block, you can specify an optional language identifier, then we can Enable syntax coloring for it. For example, this can be used to color a piece of Ruby code:

```ruby
require ‘redcarpet’
markdown = Redcarpet.new(“Hello World!”)
puts markdown.to_html
```

example

1
2
3
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html

Emphasize

In Markdown, you can use * and _ to indicate italics and bold.
Italic:

1
2
*Coding*
_Coding_

Coding
Coding

Bold:

1
2
**Coding**
__Coding__

Coding
Coding

Square brackets show the description, the URL is displayed in parentheses, and Markdown automatically converts it into a link, for example:

1
[blog](https://www.zenroad.club)

example
blog

form

In Markdown, you can make a table, for example:

1
2
3
4
First Header | Second Header | Third Header
------------ | ------------- | ------------
Content Cell | Content Cell | Content Cell
Content Cell | Content Cell | Content Cell

example

First Header Second Header Third Header
Content Cell Content Cell Content Cell
Content Cell Content Cell Content Cell

Or you can align the contents of the table and center the content, for example:

1
2
3
4
First Header | Second Header | Third Header
:----------- | :-----------: | -----------:
Left | Center | Right
Left | Center | Right

First Header Second Header Third Header
Left Center Right
Left Center Right

Dividing line

In Markdown, you can create split lines using more than 3 『-』 symbols, for example:

1
2
3
123
---
456

123


456

image

Markdown uses a link-like syntax to insert images, in two forms: inline and reference.
The inline picture syntax is as follows:

1
2
3
![Alt text](/path/to/img.jpg)
or
![Alt text](/path/to/img.jpg "Optional title")

That is:

  • An exclamation mark 『!』
  • Next a square bracket with an alternate text for the image
  • Then there is an ordinary parenthesis, which is the URL of the image. Finally, you can enclose it in quotation marks and add the optional 『title』 text.
    The quote picture syntax is as follows:
1
![Alt text][id]

『id』 is the name of the image reference. The image reference uses the same syntax defined by the link:

1
[id]: url/to/image "Optional title attribute"
-------------End of the articleThank you for reading-------------
  • Author of this article:zfish
  • Link to this article: archives/11c79d56.html
  • Copyright Notice: All articles in this blog, except for special statements, please indicate the source!
0%