Blog Garden debut ---- Markdown

Let me talk about:
    before heard of Markdown but do not know what to do, and how to use, but also thinking that time if the blog to write, how to write it? Do you want a HTML up a knock, and then edit the blog first time, found a Markdown editor, went to understand a bit, and finally shocked, this is also great with it! So I decided to first show garden blog to Markdown it! For one thing, learn about Markdown, good write beautiful blog, although the blog is more focused on the quality of the article, but the value of the Yen is also essential, and secondly, is familiar with the familiar blog Park Bo hair flow.


Text:
    Markdown is a lightweight markup language, allowing people to write documents using easy to read and write plain text format, and then converted into richly formatted HTML page, Markdown file suffix is ".md"


Demo:
灰色框内是使用方法

Here rendering


title

#标题一
##标题二
###标题三
####标题四
#####标题五

A title

Title II

Title 3

Title IV

Title 5

Character effects

~~删除线~~ 或者 <s>HTML标签里的删除线</s>
Strikethrough

*斜体字* 或者 _斜体字_
italics

**粗体** 或者 __粗体__
Bold face

***粗斜体*** 或者 ___粗斜体___
Bold italic

上标:X<sub>2</sub>,下标O<sup>2</sup>
x 2 , O 2

缩写
The <abbr title="Hyper Text Markup Language">HTML<abbr/> specification is maintained by the <abbr title="World Wide Web Consortium">W3C</abbr>
The HTML specification is maintained by the W3C

Quote

>这里是引用

    Here is a quote

Nesting

>最外层
>>第一层嵌套
>>>第三层

    Outermost

    Nesting a first layer

    the third floor

Hyperlinks

Generic Connectivity

[Markdown官网](https://www.mdeditor.com/)

Markdown official website

direct connection

直接连接:<https://www.mdeditor.com>

Direct connection: https://www.mdeditor.com

E-mail addresses are automatically connected

Code highlighting

Lines of code within the

执行命令: `npm install marked`
Excuting an order:npm install marked

Description: ( ` `) trans marks used to display the lines of code, only one line is if a multi-line, it will merge into one line display, to display multiple lines of code needed (三反引号```开头),(三反引号```结尾), to display anti-quotation marks, anti-double quotes ,这是`反引号`

Lines of code

Display multiple lines of code needed (三反引号```开头),(三反引号```结尾)
python code

def
    lists=['a','b']
    for li in lists:
        print(li)

PHP code

<?php
    echo "hello world!";
?>

JS code

function test(){
    console.log("hello world!");
}

HTML code

    <!DOCTYPE html>
    <html>
        <head>
            <mate charest="utf-8" />
            <meta name="keywords" content="Editor.md, Markdown, Editor" />
            <title>Hello world!</title>
            <style type="text/css">
                body{font-size:14px;color:#444;font-family: "Microsoft Yahei", Tahoma, "Hiragino Sans GB", Arial;background:#fff;}
                ul{list-style: none;}
                img{border:none;vertical-align: middle;}
            </style>
        </head>
        <body>
            <h1 class="text-xxl">Hello world!</h1>
            <p class="text-green">Plain text</p>
        </body>
    </html>

Preformatted text

Indented four spaces, but also as to achieve similar <pre>functionality preformatted text

| first header | second header |
| ------------ | ------------- |
|     cell     |      cell     |
|     cell     |      cell     |

image

图片加链接
![](https://www.mdeditor.com/images/logos/markdown.png)

List

Unordered list (minus sign or asterisk)

Example:

- 列表一
- 列表二
* 列表三
* 列表四

effect:

  • A list of
  • List two
  • List three
  • List four

Nested list (plus sign)

Example:

+ 列表一
+ 列表二
    + 列表二(1)
    + 列表二(2)
+ 列表三
    * 列表三(1)
    * 列表三(2)

effect:

  • A list of
  • List two
    • List two (1)
    • List two (2)
  • List three
    • List three (1)
    • List three (2)

Ordered list

Example:

1. 第一行
2. 第二行
3. 第三行

effect:

  1. first row
  2. second line
  3. The third row

draw a table

|  项目  |  价格   |  数量   |
| :----: | :----: | :----:  |
| 计算机 |   1600  |   12   |
|  手机  |   600   |   23   |
project price Quantity
computer 1600 12
Cellular phone 600 23


format meaning
:---- Left
----: Align Right
:----: Align middle



First wrote here, after making necessary supplement.

Guess you like

Origin www.cnblogs.com/leerep/p/12060690.html