The markup language used by README. md in Github-Markdown Language

Source: Internet
Author: User

The markup language used by README. md in Github-Markdown Language

The README. md file on Github is written in the Markdown language. It is a readable and easy-to-write markup language.

1. ins and outs and syntax features

Markdown is a lightweight markup language, founded by John Gruber ). It allows people to "write documents in plain text format that is easy to read and write, and then convert them into valid XHTML (or HTML) documents ". This language absorbs many of the existing plain text markup features in emails.

Markdown aims to achieve "easy to read and write 」. Readability is the most important in any case. A file written in Markdown format should be directly published in plain text, and does not seem to consist of many labels or format instructions. The Markdown syntax is influenced by some text-to-HTML formats, including Setext, atx, Textile, reStructuredText, Grutatext, and EtText. The biggest source of inspiration is the text email format. In short, the Markdown syntax is composed of all the symbols. These symbols are carefully selected, and their functions are clear at a glance. For example, adding an asterisk on both sides of the text looks like * Emphasizing *. The Markdown list looks like, well, it is the list. The Markdown block reference looks like a text reference, as you have seen in an email.

The goal of Markdown syntax is to become a writing language suitable for the network. Markdown does not want to replace HTML, and is not even similar to it. It has very few syntax types and only corresponds to a small part of HTML Tag. The idea of Markdown is not to make HTML documents easier to write. In my opinion, HTML is easy to write. Markdown makes it easier to read, write, and modify documents. HTML is a publishing format and Markdown is a writing format. In this way, the Markdown format syntax only covers the scope that can be covered by plain text.

Because of these characteristics of Markdown, and its function is more powerful than that of plain text, many people use it to write blogs. The world's most popular blog platforms WordPress and large CMS such as joomla and drupal all support Markdown well.

2. edit software

If we want to write the Markdown code, we need an editor first.

Of course, if you are using another platform, you can select an online editor, which is also very effective.

Two online Markdown editors are provided.

Http://mahua.jser.me/

Http://maxiang.info/

The first one is developed by myself. It is free to use and is very nice!

The second is a released product, which can be edited online for free. In addition, you can also synchronize the content to the Evernote, but you can only try for 10 days, it will take 79/year, it is still very good.

3. common syntax Introduction

This section only describes the most common and common functions. To view all the syntaxes, go

(1) Title

The title uses different numbers of "#" to identify what level can correspond to the H1-H6 in HTML, the following is the sample code and effect

"=========" Style is also acceptable, but I don't like it, it's easy to use "#"

(2) images

We can use the following syntax to add an image

! [Alt text] (/path/to/img.jpg)

The details are as follows:

An exclamation point!

Next, a square brackets are used to place the replaced text in the slice.

Followed by a normal bracket, which contains the URL of the slice

The following is an example

(3) emphasize

We can use the following method to add the effect of emphasis to our text.

* Emphasis * or _ emphasis _ (example: italic)

** Emphasize more ** or _ emphasize more _ (example: bold)

* ** Special emphasis ** or ___ special emphasis ___ (example: bold italic)

The following is an example:

(4) Code

If you want to add code to the article, you can use either of the following methods:

The first method is to enclose the code using reverse quotation marks (the button under the esc key ).

The following is an example code.

The second method is to use tabs or at least four spaces to indent rows.

The following is an example code.

(5) line feed

If we want to wrap a line of text, we can enter at least two spaces where we need to wrap the line, and then press Enter. Note that if we don't press enter, it will not work, just like below

(6) Reference

If we reference the document in the article, we can use a right angle bracket ">" to indicate that this is a reference. We can add one at the beginning or one before each line. We can also embed other references in references. The following is an example:

(7) Links

If we add a link to our article, we can add it in the following way:

[Link text] (link address)

Example: [Markdown] (

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.