Summary of the use of markup language (Markdown) introduction

零下一度
Release: 2017-05-22 11:44:17
Original
2443 people have browsed it

Markdown is a markup language that can be written using an ordinary text editor. Through simple markup syntax, it can make ordinary text content have a certain format, thereby making the text easy to read and write, and enhancing readability. Therefore, Markdown is widely used in communication and learning websites with large amounts of text such as hexo personal Summary of the use of markup language (Markdown) introduction, Github, and Coding.

Summary of the use of markup language (Markdown) introduction

Markdown

The following is the format commonly used in Markdown:


1. Title

  • The title has six levels, divided into level one, level two... to level five and level six, similar to the h1-h6 tag in HTML, add before the title text #, the first level is preceded by one #, the sixth level is preceded by six #, and so on.

  • Tips: Add a space between # and the following text.

md writing method:

    # 一级标题
    ## 二级标题
    ### 三级标题
    #### 四级标题
    ##### 五级标题
    ####### 六级标题
Copy after login

The result shows:

First level title

Second level title

Three level title

Fourth level title

Fifth level title
Sixth level title

2. Single-line text and multi-line text

  • ##Single-line text and multi-line textAdd two Tab before Can

      文本前加入两个Tab即可
      文本前加入两个Tab即可
    Copy after login


3. Unordered (ul) list

md writing method:

    * 昵称:隔壁小王
    * 别名:隔壁老王
    * ID:小王
Copy after login

The result shows:

  • Nickname: Little King Next Door

  • Alias: Old King Next Door

  • ID: Xiao Wang


4. Ordered (ol) list

  • A

    number+ .+Content

md writing method:

    1. 前端
    3. 后台
    4. 测试
    9. UI
    6. 产品
Copy after login

Result display:

  1. Front-end

  2. Backend

  3. Test

  4. UI

  5. Product

  • Tips: The

    number here is not required Arrange them in a certain order.


5. Structure list

md writing method:

* 编程语言
    * 脚本语言
        * Python
Copy after login

Result display:

  • Programming Language

    • Python

    • Scripting Language


6. An image with a title attribute (img tag)

md writing:

![面对疾风吧](http://upload-images.jianshu.io/upload_images/3876828-a4346506018aa44f.gif?imageMogr2/auto-orient/strip "哈赛给 啊痛")
Copy after login

The result shows:

Summary of the use of markup language (Markdown) introduction

Face the blast


7. A hyperlink (a tag)

md writing method:

    [个人博客](zmnaer.com "zmnaer个人博客")
Copy after login

The result shows:

Personal Summary of the use of markup language (Markdown) introduction


8. One has a hyperlink The picture of

md is written as:

    [![zmnaer]](http://zmnaer.com)
    [zmnaer]:img.php.cn/upload/article/000/001/506/68b17795853d56aba0979fd7c03deb19-2.gif "Summary of the use of markup language (Markdown) introduction"
Copy after login

The result shows:

Summary of the use of markup language (Markdown) introduction

zmnaer


9. Line break (br)

md writing method:

    第一行文字
    <br/>
    第二行文字
Copy after login

The result display:

First line of text

Second line of text


10. Highlight text, italic, bold, bold italic

md writing method:

    `高亮`显示的`文字`
    *斜体*@文字
    **粗体**@文字
    ***加粗斜体***@文字
Copy after login

The result display:

Highlight displayed text
Italic@Text
Bold@Text
Bold Italic@Text


11. The specially displayed text block

md is written as:

    ##三
  • ·

    +bash(or java, javascript, php, html...) + newline + code block... + newline + three ·

The result shows:

document.getElementById(&#39;obj&#39;);//javascript
Copy after login

    Tip: The
  • ·

    here is English input method下注 Please ignore the character above the Tab key , +.

12. Table

md writing method:

    |表头1|表头2|表头3|
    |:---:|:---:|:---:|
    |con11|con22|con33|
    |con11|con22|con33|
Copy after login
Result display:

Header 1##con11con22con33con11con22con33
  • Tips: : here is equivalent to the text-align attribute in CSS; : is the text ## on the left #Left alignment;:On the right is the text right alignment; if it is on both sides, the text is centered (equivalent to text-align:center ).

Tips:

    ## Generally, Markdown documents end with
  • .md

    suffix ending;

  • Github

    , Coding and other open source communities generally have README in the root directory of the warehouse .md file, which is written in Markdown format and can be displayed directly below the warehouse for warehouse description or API overview;

  • All # in the article ##·
  • are all

    English input methodThe character above the Tab key (the so-called Floating Number), +# Please ignore the ## sign and do not write it. (Supplement: · in highlighting and special display); Markdown supports most

    HTML tags
  • , and you can write HTML tags directly , and can add
  • inline style

    ;Markdown is parsed differently in various places, so the result display will be different, and some platforms cannot parse tables.

  • This article is for reference only. If there is any ambiguity, please forgive me.

  • 【Related recommendations】

  • 1.
WeChat public account platform source code download

2. Alizi Order system source code

3. WeChat voting source code

Header 2 Header 3

The above is the detailed content of Summary of the use of markup language (Markdown) introduction. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!