EasyDebug.NET

Markdown Cheat Sheet

Inline styles, headings, lists, tables, code and platform extensions

63 syntax entries

**加粗**Inline basics

渲染为加粗文字

Bold, using double asterisks or underscores.

*斜体*Inline basics

渲染为斜体文字

Italic, using a single asterisk or underscore.

***粗斜体***Inline basics

渲染为加粗且斜体

Bold and italic together.

~~删除线~~Inline basics

文字中间加一条删除线

Strikethrough, a GFM extension not in CommonMark.

`行内代码`Inline basics

灰底等宽文字

Inline code wrapped in single backticks.

**粗体里含*斜体***Inline basics

嵌套行内样式

Inline styles can nest, but underscores are less error-prone.

Watch out: A space just inside the asterisks breaks it, so ** bold ** fails.

---Inline basics

一条水平分割线

Thematic break: three or more hyphens, asterisks, or underscores.

Watch out: Directly under text, hyphens become a Setext heading; keep a blank line above.

\*Inline basics

显示为字面星号

Backslash escape: the next character is taken literally.

Watch out: Only a fixed set of ASCII punctuation can be escaped.

行尾两个空格Inline basics

强制换行,不产生新段落

Two trailing spaces force a line break.

Watch out: Trailing spaces are invisible and often stripped by formatters.

行尾反斜杠Inline basics

强制换行,效果同上但可见

A trailing backslash forces a line break and stays visible.

 Inline basics

插入一个不折行空格

Raw HTML entities pass through untouched.

<!-- 注释 -->Inline basics

渲染后不显示

Comment: absent from the rendered output.

# 一级标题Headings

最大的标题

Headings 1 through 6; a space after the hashes is required.

Watch out: Without the space most parsers ignore it.

###### 六级标题Headings

最小的标题

Level six; more than six hashes renders literally.

标题 ===Headings

上一行变成一级标题

Setext style: equals signs turn the line above into a level-one heading.

标题 ---Headings

上一行变成二级标题

Setext style with hyphens for a level-two heading.

{#custom-id}Headings

给标题指定锚点 id

Custom heading id; not standard Markdown.

Watch out: GitHub generates anchors by lowercasing and hyphenating, dropping non-ASCII.

1. 有序项Lists

带序号的一项

Ordered list: digits, a period, then a space.

1) 有序项Lists

带序号的一项

Alternative ordered marker; not all parsers accept it.

- 一级 - 二级Lists

缩进的子列表

Nested list: indent children by two to four spaces.

Watch out: Too little indent flattens the list; too much creates a code block.

- [ ] 待办Lists

带空复选框的一项

Task list, unchecked (GFM extension).

- [x] 已完成Lists

带勾选复选框的一项

Task list, checked; the x is case-insensitive.

- 列表项 第二段Lists

同一项里的第二个段落

Multiple paragraphs in one item; align continuation with the item text.

- 列表项 ```js code ```Lists

列表项里的代码块

A fenced code block inside a list item must be indented to the list content.

3. 从三开始Lists

序号从三开始且后续递增

The first number is honored; later numbers are auto-incremented.

| 列 A | 列 B |Tables

表头行

The first row is the header.

| --- | --- |Tables

分隔行,必须有

The delimiter row is mandatory or it is not a table.

Watch out: Column counts must match the header or extra cells are dropped.

| :--- | ---: |Tables

左对齐与右对齐

Colon placement sets alignment: left, right.

| :---: |Tables

居中对齐

Colons on both sides center the column.

\|Tables

显示为竖线字符

Escape a pipe to show it inside a cell.

<br>Tables

单元格内换行

Use an HTML br for line breaks inside cells.

```jsCode

带语法高亮的代码块

Fenced code block; naming the language turns on highlighting.

Watch out: Omitting the language usually means no highlighting.

~~~Code

波浪号围栏代码块

Tilde fences, useful when the content contains backticks.

缩进四空格Code

缩进式代码块

Indented code block, the legacy form.

`` `code` ``Code

内层含反引号的行内代码

Use more backticks than the content contains.

[文本](https://example.com)Links and images

一个超链接

Inline link.

[文本](https://example.com "标题")Links and images

带悬停标题的链接

A link may carry a title shown on hover.

<https://example.com>Links and images

自动识别为链接

Angle brackets turn a URL into a link automatically.

[文本][ref] [ref]: https://example.comLinks and images

引用式链接

Reference-style link, keeping long URLs at the bottom.

![替代文字](image.png)Links and images

一张图片

Image syntax is a link with an exclamation mark.

Watch out: Never omit alt text; it is the only clue when the image fails.

[![图片](img.png)](https://example.com)Links and images

点击图片跳转

An image wrapped in a link.

[标题](#自定义锚点)Links and images

跳到页内某处

Jump within the page; the anchor rules come from the renderer.

[文本](./docs/other.md)Links and images

跳到相对路径文件

Relative path link, clickable only where the platform supports it.

\[不是链接\]Links and images

显示为字面方括号

Escape brackets that appear literally in link text.

> 引用内容Block quotes

左侧带竖线的段落

Block quote; a space after the caret is conventional.

>> 嵌套引用Block quotes

两级缩进的引用

Nested quote: add one caret per level.

> > 第二段Block quotes

引用里的第二个段落

A blank line inside a quote still needs the caret.

> ```js > code > ```Block quotes

引用里的代码块

Every line of a code block inside a quote needs the caret.

> **注意**:内容Block quotes

带强调的提示块

Quotes accept emphasis and other inline syntax.

> [!NOTE]Platform extensions

带图标的提示块

GitHub alert block; also TIP, IMPORTANT, WARNING, CAUTION.

Watch out: Only works on GitHub and its derivatives; elsewhere it is a plain quote.

[^1]Platform extensions

脚注标记

Footnote reference; define it at the bottom.

[^1]: 脚注内容Platform extensions

脚注定义

Footnote definition; the label can be any identifier.

:smile:Platform extensions

渲染为一个表情

Emoji shortcode, backed by the platform emoji table.

$E = mc^2$Platform extensions

行内数学公式

Inline math, requiring MathJax or KaTeX.

Watch out: Most platforms render this literally unless math is enabled.

$$ E = mc^2 $$Platform extensions

独立成行的公式

Block math, also renderer-dependent.

```mermaidPlatform extensions

渲染成图表

Mermaid diagram; the platform must support it.

[[_TOC_]]Platform extensions

渲染为目录

Auto table of contents, supported by GitLab and some wikis.

Watch out: Not supported on GitHub; it renders literally.

#123 / @userPlatform extensions

渲染为可点击的引用

Issue references and mentions are platform features, not Markdown.

<br>Inline HTML

强制换行

Raw HTML passes through on most platforms.

<details><summary>标题</summary>内容</details>Inline HTML

可折叠区块

Collapsible block, handy for long logs.

Watch out: GitHub renders it but skips Markdown inside unless blank lines are used.

<img src="a.png" width="200">Inline HTML

指定宽度的图片

HTML images accept attributes like width.

<kbd>Ctrl</kbd>Inline HTML

键帽样式

Keyboard key styling, common in documentation.

Markdown 里的**粗体**与 <b>粗体</b>Inline HTML

两种粗体写法都生效

Inline HTML and Markdown can mix.

Watch out: Block-level HTML needs blank lines around it or Markdown stops parsing inside.

Something broken or missing?

Send feedback
Author's Blog
Share an idea