[Csdn_markdown] Markdown Basic Syntax 2

Source: Internet
Author: User

Introduction

The basic syntax of markdown is introduced in the Markdown Basic grammar, knowing that the basic grammar, in fact, can be written in plain text blog. For those of us who write code or who are going to write code, it doesn't seem to be enough, and we want to insert images, code, tables, hyperlinks! This article describes how to use these features in Markdown.

Table

As the following table:

name Age Education
Tom 16 High school
John doe 17 University
Harry 18 Graduate


His markdown text is:

| 姓名 | 年龄 | 学历 ||:--- |:---:| ---:|| 张三 | 16 | 高中 || 李四 | 17 | 大学 || 王五 | 18 | 研究生|

From the above example, we can see that the table generated by Markdown uses a colon to select left :--- , right, ---: or center :---: -aligned. The number of short lines in the second line of code can be based on aesthetics.

Code

For example, insert the following section of code:

#include <iostream>usingnamespacestd;int main(){  cout"hello markdown" << endl;  return0;}

You can enter the content in the Markdown editor:

The syntax rules are:

Use three anti-quotes "'" on the previous and subsequent lines of the code block that you want to highlight, and the language that the first line is used for after the surface code block

The code within the line can be wrapped in two anti-quotes, for example, by printf() typing ' printf () '.

Insert Picture Insert a picture in plain text mode

Insert Picture

The above figure is implemented by the following text

![hust](http://www.hust.edu.cn/images/logo.gif)

The syntax is:

Exclamation marks! followed by a bracket [], you can add a caption in parentheses, followed by a parenthesis (), enter the URL of the inserted image in parentheses

insert using Csdn's Markdown editor

You can also select the Insert Picture button in the toolbar of the Csdn markdown Editor:

Choose Upload Image

Then select the picture, point set upload, OK, one go ~ ~

Hypertext Links

Add a hyperlink directly to the text

Parentheses followed by a parenthesis, a hint is added to the brackets, and a hyperlink is added to the parentheses.

For example

[bendanban的博客](http://blog.csdn.net/bendanban/)

Can be applied to similar papers in the format referenced

Use two adjacent two brackets in the body. The first bracket is added with the hint text, and the second bracket adds an ID that allows you to make numbers, letters, and so on.
At the end of the text, add a format similar to the reference: a bracket, followed by a colon, and then the connection address. Enter the ID in the first bracket.

For example:

[提示文字][1][1]: http://blog.csdn.net/bendanban 

You can also include a hyperlink directly in the body using two angle brackets.

For example:

<http://blog.csdn.net/bendanban/><[email protected]>
Summary

This article mainly introduces how to use tables, codes, images, hyperlinks to enrich your blog in markdown. The table is a combination of a vertical bar and a colon; The code is an opening quote of three, or one; the picture uses an exclamation mark, a bracket, a parenthesis, and a hyperlink that uses brackets, parentheses, angle brackets, and so on.

PS: Welcome everybody to criticize correct!

[Csdn_markdown] Markdown Basic Syntax 2

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.