Markdown Cheat Sheet

Markdown是一种轻量级的标记语言。它的设计使其可以转换成许多输出格式,比如HTML。

这份Markdown备忘单提供了所有Markdown语法元素的快速概述。它无法涵盖每一个特殊情况,如果您需要更多关于这些元素的信息,请参考基本语法的参考指南和 扩展语法

概览

以下内容直接来自 the official cheatsheethugo不支持的语法已标记 ×.

基本语法

这些是 约翰·格鲁伯 原始设计文档中概述的要素。所有的 Markdown 应用程序都支持这些要素。

标题

一级标题

二级标题

三级标题

# 一级标题
## 二级标题
### 三级标题

粗体

bold text

**bold text**

斜体

italicized text

*italicized text*

引用

blockquote

> blockquote

有序列表

  1. First item
  2. Second item
  3. Third item
1. First item
2. Second item
3. Third item

无序列表

  • First item
  • Second item
  • Third item
- First item
- Second item
- Third item

代码

code

`code`

分割线


---

链接

Markdown Guide

[Markdown Guide](https://www.markdownguide.org)

图片

alt text

![alt text](https://www.markdownguide.org/assets/images/tux.png)

扩展语法

这些元素通过添加附加功能来扩展基本语法。并非所有的Markdown应用都支持这些元素。

表格

SyntaxDescription
HeaderTitle
ParagraphText
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |

栅栏代码块

{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}

脚注

Here’s a sentence with a footnote. 1

Here's a sentence with a footnote. [^1]

[^1]: This is the footnote.

标题自定义ID

My Great Heading

### My Great Heading {#custom-id}

定义列表

term
definition
term
: definition

删除线

The world is flat.

~~The world is flat.~~

任务列表

  • Write the press release
  • Update the website
  • Contact the media
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media

表情符号 ×

That is so funny! :joy:

Gone camping! :tent: Be back soon.

That is so funny! :joy:

Gone camping! :tent: Be back soon.

(See also Copying and Pasting Emoji)

高亮 ×

I need to highlight these ==very important words==.

I need to highlight these ==very important words==.

下标 ×

H2O

上标 ×

X^2^


  1. This is the footnote. ↩︎