Skip to main content

Common Markdown Syntax

·564 words· loading ·
Tool

Markdown is a simple and easy-to-use markup language for creating formatted text using a plain-text editor.

Headings
#

There are 6 level heading options.

# Heading level 1
## Heading level 2
### Heading level 3
#### Heading level 4
##### Heading level 5
###### Heading level 6

Output:

There is a space between # and the heading name.

Phrase Emphasis
#

To make a phrase bold, surround words with ** or _.
To make a phrase italic, surround words with * or _.
To make a phrase underscore, surround words with <u> and </u>.
To make a phrase strikethrough, surround words with ~~.

**bold**
*italic*
_italic_
<u>underscore</u>
~~strikethrough~~

Output:

Font, color, size
#

Use HTML tag to set the font, color, and size of the content.

<font color="red" size=3 face="Times New Roman">Times New Roman</font>

Output:

Times New Roman

Center
#

Use HTML tag to set the content to the center.

<center>center</center>

Output:

center

Image
#

Write the image caption text inside []. If there is a title for the image, write into () as well.

![CaptionText](/path/to/image.jpg)
![CaptionText](/path/to/image.jpg "title")

If some parameters need to be adjusted, use HTML tags:

<img src="/path/to/image.jpg" width = "300" height = "200" alt="title" align=center />

Hyperlink#

Put the link name into [], and the hyperlink into():

[LinkName](https://yourlink.com)

Or simply put the link into <>:

<https://yourlink.com>

Output:

LinkName

https://yourlink.com

Anchor link#

Jump to a Specific Part of this Page:

[content](#TheHeadingYouWantToJump)
Inside (), the heading name should be all small letters beginning with #, ignore the . and _ inside the heading and use - instead of a blank space.

For example, jump to the Phrase Emphasis of this article:

[Phrase Emphasis](#phrase-emphasis)

List
#

Bulleted lists use asterisks*, pluses+, and hyphens- as list markers.

* line1
* line2
- line1
- line2
+ line1
+ line2

Same output:

  • line1
  • line2

Numbered lists use regular numbers followed by periods.

1. line1
2. line2

Output:

  1. line1
  2. line2

Check lists use list markers as bulleted lists, then make checkbox as follows:

* [ ] unchecked item
* [x] checked item

Output:

Blank space
#

Put &ensp; bwtween words to make a blank space. The number of &ensp; means the number of blank spaces.

word1&ensp;word2&ensp;&ensp;word3

Output:

word1 word2  word3

blank lines
#

Put <br> between words to make a new line and blank lines. The number of <br> means the number of new lines.

line1<br>line2<br><br>line3<br><br><br>line4

Output:

line1
line2

line3


line4

Horizontal rule
#

Produce a horizontal rule by placing three or more asterisks*, hyphens-, or underscores_ on a line.

***
---
___

Output:




Or use HTML tag <hr /> instead.

Blockquotes
#

Use a chevron > for quotation, and more > for further nesting.

>blockquote
>>nested blockquote
>>>further nested blockquote

Output:

blockquote

nested blockquote

further nested blockquote

Code blocks
#

Use ` for inline code as below:

`inline code`

For multiple lines of code, wrap with three backticks ```:

    ```
    fenced code
    ```

Comments
#

Leave single comments:

[//]: # (comments here.)
[^_^]: # (comments here.)

Use HTML tags to hide multiple paragraph comments:

<div style='display: none'> 
Comments1
Comments2
Comments3
</div>

Or:

<!--
Comments1
Comments2
Comments3
-->
Leave a blank line before the comments block.
## Formula blocks

Use $ for single formula, and $$ blocks.

$\sin 2x = 2\cos x \sin x$

$$
E_{\rm k}=\frac{1}{2}m v^2 
\tag{1.1}
$$

Output:

$\sin 2x = 2\cos x \sin x$

$$ E_{\rm k}=\frac{1}{2}m v^2 \tag{1.1} $$