Table of Contents
Preface" >Preface
1. Shortcut keys
2. Basic syntax
3. Commonly used techniques
5. Footnote
4. High-end usage
2. Youdao Cloud Notes supports markdownpad syntax. Official website: http://note.youdao.com/ It has an online web version and a PC version that can be downloaded. Of course, Youdao Cloud Notes also supports html syntax.
Home Development Tools VSCode Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

Aug 05, 2022 am 09:42 AM
markdown syntax

Preface

Those who have written blogs or documents on github should know the importance of Markdown syntax. Friends who don’t know, don’t worry. This blog post easily masters Markdown syntax. By the way, this syntax is super simple and you can understand it at a glance. If you don’t believe me, just click in and take a look.

1. Shortcut keys

#Function Shortcut keys
Bold Ctrl B
Italic Ctrl I
Quote Ctrl Q
Insert link Ctrl L
Insert code Ctrl K
Insert picture Ctrl G
Promote title Ctrl H
Ordered list Ctrl O
Unordered list Ctrl U
Horizontal line Ctrl R
Undo Ctrl Z
Redo Ctrl Y

2. Basic syntax

2.1 Font settings italic, bold, strikethrough

*Here is text*
_Here is text_
**Here is text**
***Here is text***
~~Here is text~~

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

2.2 Graded title

Writing method 1:

# First-level title

## Second-level title

Three-level headings

# Four-level headings

## Five-level headings

Comprehensive understanding of Markdown syntax in one article (with pictures and examples) Sixth-level headings

This writing method has the same effect as **text**

Writing method 2:


This is a first-level title
============================

Or
Second level title

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

##2.3 Link

(1) Insert local image linkComprehensive understanding of Markdown syntax in one article (with pictures and examples)

Syntax There are two ways to write the rules:

Note: You don’t need to write this picture description. Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

The sample picture is as follows:

(2) Insert pictures on the Internet Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

Grammar rules:

Note: You don’t need to write this picture description. Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

Examples are as follows:

(3) Automatic connection

Markdown supports processing URLs and emails in the form of shorter automatic links As long as the mailbox is wrapped with , Markdown will automatically convert it into a link. You can also write it directly or display it as a link. Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

For example:

##2.4 Dividing line

Comprehensive understanding of Markdown syntax in one article (with pictures and examples) You can use more than three asterisks (*), minus signs (-), and underscores (_) in a line to create a separator line, and there must be no other things in the line. You can also insert spaces between asterisks or minus signs.

2.5 Code Block


This function is essential for programmers. There are two ways to insert program code. One is to use indentation (tab), and the other is to use the English "`" symbol (usually under the ESC key, the same key as ~) to wrap the code. Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

(1) Code block: Indent 4 spaces or 1 tab. The effect is as follows:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples) (2) Inline style: If you need to quote code within a line, just use backticks ` (usually under the ESC key, the same key as ~ )


(3) Multi-line code blocks and syntax highlighting: Use three single back quotes "`" to wrap the previous and next lines of the code block that needs to be highlighted. , that’s it. Comprehensive understanding of Markdown syntax in one article (with pictures and examples) Examples are as follows:

(4) The code block contains html code

In the code block, &, will Automatically converted into HTML entities, this method makes it very easy for you to use Markdown to insert the HTML source code for the example. You only need to copy and paste it, and Markdown will handle the rest for you.

Note: HTML is not supported in Jianshu code blocks.

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)Examples are as follows:

2.6 Quote

Add> before the quoted text ; symbol, and a space are enough. If only a > symbol is entered, a blank reference will be generated.

(1) Basic usage ######The usage is as shown in the figure below: ###

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

(2) Nested use of references

is used as shown in the figure:
Comprehensive understanding of Markdown syntax in one article (with pictures and examples)
(3) References to other elements

Other Markdown syntax can also be used in the quoted block, including titles, lists, code blocks, etc.

Use as shown in the figure:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

2.7 List

(1) Unordered list

Use *, , - to represent an unordered list.

Note: There must be a space after the symbol to act as an indent.

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

(2) Ordered list

Use numbers and an English period to represent an ordered list.

Note: There must be a space after the English period to act as an indent.

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

(3) Unordered lists and ordered lists are used simultaneously

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

(4) Lists are mixed with other elements The

list can not only be used alone, but also other Markdown syntax, including titles, quotes, code blocks, etc.

Notes:

(1) The bold effect cannot be used directly in the list title, but it can be nested and mixed in the list.
(2) The list contains code blocks (preceded by 2 tabs or 8 spaces, and a blank line is required, otherwise it will not be displayed).
.
Usage examples are as follows:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

(5) Notes

When using a list, as long as it is after the number Adding English dots will create a list unintentionally, for example, 2017.12.30. What you want to express at this time is the date. Some software mistakenly thinks it is a list. Solution: Just add \ in front of each point.

As shown below:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

2.8 Table

The basic writing method of the table is very simple, just like the table The shapes are very similar:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

Table alignment: We can specify the alignment of table cells. The colon on the left means left alignment, on the right means aligned, and on both sides. Centered.

As shown below:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

3. Commonly used techniques

3.1 Line break

Method 1: Enter more than two consecutive spaces and enter
Method 2: Use html language to wrap tags:

##3.2 Indent characters

without interruption Blank space or half-width space or full-width space or HI

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

3.3 Special symbols

(1) For syntax symbols in Markdown , add a backslash \ in front to display the symbol itself.

Examples are as follows:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

(2) Other special characters, examples are as follows:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples) Want to know the character correspondence For the Unicode code, you can see this website: https://unicode-table.com/cn/

Attached is a comparison chart of the support of special characters by several tools:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

3.4 Font, font size and color

Markdown is a markup language that can be written using an ordinary text editor, through HTML-like markup Grammar, which allows ordinary text content to have a certain format. But it itself does not support functions such as modifying fonts, font sizes, and colors!

CSDN-markdown editor is its derivative version, extending the functions of Markdown (such as tables, footnotes, embedded HTML, etc.)! Yes, it is embedded HTML. The functions to be discussed next need to be implemented using the method of embedded HTML.

Edit the font, font size and color as follows

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

Please see the table below for specific color classifications and markings:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

3.5 Advanced operations of links

Advanced operations of links (this needs to be mastered, it is very useful)

1. Inline

This section has already been discussed in the second basic syntax link above, so I won’t continue to explain it here.

2. Reference link

Write ![image or URL link][mark] where you want to insert the image in the document, and write [mark] at the end of the document ]: Image address "title". (The last "title" does not need to be filled in)

Examples are as follows:
Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

3. Contents table of contents

is in the paragraph Fill in [TOC] to display the table of contents structure of the full text content.

4. Anchor point

The anchor point is actually an on-page hyperlink. For example, if I write an anchor point here and click to return to the directory, I can jump to the directory. Click on this section in the table of contents to jump to it.

Note: When using anchor points in a brief book, clicking will open a new current page. Although anchor points are not very comfortable to use, you can use footnotes to achieve this function.

Syntax instructions:

Insert the anchor point {# mark} after the specified title you plan to jump to, and then write the link to the anchor elsewhere in the document Click the link.

Use as shown below:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

5. Footnote

Grammar description:

Add the footnote name [^footnote name] after the text that needs to be added as a footnote, which is called annotation. Then add a footnote anywhere in the text (usually at the end). There must be a corresponding footnote name before the footnote.

Examples are as follows:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

Note:

  • The footnote is automatically moved to the end, please Go to the end of the article to view, and the link behind the footnote can jump directly back to the place where the footnote was added.

  • Since Jianshu does not support anchor points, you can use footnotes to jump within the page.

3.6 Background color

Markdown itself does not support background color setting, it needs to be implemented using built-in html: with the help of table, tr , td and other table tags' bgcolor attribute to implement the background color function. Examples are as follows:

<table><tr><td bgcolor=orange>背景色是:orange</td></tr></table>
Copy after login

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

##3.7 emoji emoticons

emoji emoticons use the format of:EMOJICODE:, the detailed list can be seen

https://www.webpagefx.com/tools/emoji-cheat-sheet/

Of course, many markdown tools or websites do not support it now.

The following is a comparison of several platforms:

Tool or websiteWhether it supports emoji emoticons简书NoMarkDownPadNo (I don’t know if the paid version supports it)Youdao Cloud NotesNozybuluo.comNogithub is

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

4. High-end usage

4.1 Latex mathematical formula

Use LaTex mathematical formula

1. Inline formula: Use two pairs of "$" symbols to reference the formula:

$Formula$

2. Interline formula: Use two pairs of "$$" symbols to reference the formula :

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)                                                                                                                                                                             to                           down ’     ’ way ’ way ’ way way way way way way way way out way out way out way out out way out out out outole outole out outole out out out out out out out out out Out out out out off Off ote Instructions:

##4.3 Make a to-do list—Todo list

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

4.4 Drawing a sequence diagram

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

4.5 Drawing a Gantt chart

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

5. Markdown tool

1. markdownpad software uses markdown language to write notes. Official website download address: http://markdownpad.com/

The schematic diagram after the software is installed is as shown below:

Comprehensive understanding of Markdown syntax in one article (with pictures and examples)

2. Youdao Cloud Notes supports markdownpad syntax. Official website: http://note.youdao.com/ It has an online web version and a PC version that can be downloaded. Of course, Youdao Cloud Notes also supports html syntax.

The example picture of using markdown in the web version is as follows:


Comprehensive understanding of Markdown syntax in one article (with pictures and examples)3. Edit markdown online https://www.zybuluo.com/mdeditor

The above is the detailed content of Comprehensive understanding of Markdown syntax in one article (with pictures and examples). For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1669
14
PHP Tutorial
1273
29
C# Tutorial
1256
24
How to define header files for vscode How to define header files for vscode Apr 15, 2025 pm 09:09 PM

How to define header files using Visual Studio Code? Create a header file and declare symbols in the header file using the .h or .hpp suffix name (such as classes, functions, variables) Compile the program using the #include directive to include the header file in the source file. The header file will be included and the declared symbols are available.

What computer configuration is required for vscode What computer configuration is required for vscode Apr 15, 2025 pm 09:48 PM

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

How to solve the problem of vscode Chinese annotations becoming question marks How to solve the problem of vscode Chinese annotations becoming question marks Apr 15, 2025 pm 11:36 PM

How to solve the problem that Chinese comments in Visual Studio Code become question marks: Check the file encoding and make sure it is "UTF-8 without BOM". Change the font to a font that supports Chinese characters, such as "Song Style" or "Microsoft Yahei". Reinstall the font. Enable Unicode support. Upgrade VSCode, restart the computer, and recreate the source file.

vscode terminal usage tutorial vscode terminal usage tutorial Apr 15, 2025 pm 10:09 PM

vscode built-in terminal is a development tool that allows running commands and scripts within the editor to simplify the development process. How to use vscode terminal: Open the terminal with the shortcut key (Ctrl/Cmd). Enter a command or run the script. Use hotkeys (such as Ctrl L to clear the terminal). Change the working directory (such as the cd command). Advanced features include debug mode, automatic code snippet completion, and interactive command history.

Where to write code in vscode Where to write code in vscode Apr 15, 2025 pm 09:54 PM

Writing code in Visual Studio Code (VSCode) is simple and easy to use. Just install VSCode, create a project, select a language, create a file, write code, save and run it. The advantages of VSCode include cross-platform, free and open source, powerful features, rich extensions, and lightweight and fast.

Common commands for vscode terminal Common commands for vscode terminal Apr 15, 2025 pm 10:06 PM

Common commands for VS Code terminals include: Clear the terminal screen (clear), list the current directory file (ls), change the current working directory (cd), print the current working directory path (pwd), create a new directory (mkdir), delete empty directory (rmdir), create a new file (touch) delete a file or directory (rm), copy a file or directory (cp), move or rename a file or directory (mv) display file content (cat) view file content and scroll (less) view file content only scroll down (more) display the first few lines of the file (head)

vscode Previous Next Shortcut Key vscode Previous Next Shortcut Key Apr 15, 2025 pm 10:51 PM

VS Code One-step/Next step shortcut key usage: One-step (backward): Windows/Linux: Ctrl ←; macOS: Cmd ←Next step (forward): Windows/Linux: Ctrl →; macOS: Cmd →

Can vs code run in Windows 8 Can vs code run in Windows 8 Apr 15, 2025 pm 07:24 PM

VS Code can run on Windows 8, but the experience may not be great. First make sure the system has been updated to the latest patch, then download the VS Code installation package that matches the system architecture and install it as prompted. After installation, be aware that some extensions may be incompatible with Windows 8 and need to look for alternative extensions or use newer Windows systems in a virtual machine. Install the necessary extensions to check whether they work properly. Although VS Code is feasible on Windows 8, it is recommended to upgrade to a newer Windows system for a better development experience and security.

See all articles