Markdown语法

Markdown 的创建者编写的原始指南  Daring Fireball: Markdown 

本文主要摘自: Markdown 语法速查表 | Markdown 官方教程

基本语法

标题 几个#就几级标题,最多可以一直到六级标题

# H1 一级标题
## H2 二级标题
### H3 三级标题

效果:

一级标题

二级标题

三级标题

四级标题

五级标题
六级标题

 

**bold text 粗体**

bold text 粗体

*italicized text 斜体*

italicized text 斜体

***还可以粗体加斜体***

还可以是粗体加斜体

> blockquote 引用块

blockquote 引用块

有序列表

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

效果:
  1. First item 项目1
  2. Second item 项目2
  3. Third item 项目3

无序列表

- First item
- Second item
- Third item

  • First item
  • Second item
  • Third item

- 无序列表 1

- 无序列表 2

  - 无序列表 2.1

  - 无序列表 2.2

效果:
  • 无序列表 1
  • 无序列表 2
    • 无序列表 2.1
    • 无序列表 2.2

用*也可以

* 项目1

* 项目2

效果:
  • 项目1

  • 项目2

`code 行内代码`

code 行内代码

分割线

(注意需要在分割线上空一行)

---


链接

[title](https://www.example.com)

title

图片  

![alt text](image.jpg)    

注:Alt text(alternative text替代文本)。支持 jpg、png、gif、svg 等图片格式,其中 svg 文件仅可在微信公众平台中使用。支持https的图片拖拽和截图粘贴到编辑器中。

洛天依

扩展语法

表格:

(用冒号定义对齐方式)

| Syntax      | Description |
| ----------- | ----------- |
| Header      | Title       |
| Paragraph   | Text        |

Syntax Description
Header Title
Paragraph Text

| 姓名 | 年龄 | 工作 |

| :----- | :--: | -------: |

| 小可爱 | 18 | 吃可爱多 |

姓名 年龄 工作
小可爱 18 吃可爱多

代码块

注:第一行```后标注代码语言

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

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

脚注

Here's a sentence with a footnote. [^1]
[^1]: This is the footnote. 注:这个在文末,类似参考文献

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

标题编号

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

My Great Heading

定义列表

term
: definition

term
definition

删除线

~~The world is flat.~~

The world is flat.

任务列表

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

数学公式

行内公式:

$\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}后面补一个美元符号

\(\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}\)

块公式:

$$H(D_2) = -\left(\frac{2}{4}\log_2 \frac{2}{4} + \frac{2}{4}\log_2 \frac{2}{4}\right) = 1$后面再补个美元符号

\[H(D_2) = -\left(\frac{2}{4}\log_2 \frac{2}{4} + \frac{2}{4}\log_2 \frac{2}{4}\right) = 1 \]

TOC
Table of Content,列出全部标题

[TOC]

注音符号(微信公众号支持)

{喜大普奔|hē hē hē hē}

{喜大普奔|hē hē hē hē}(这个语法好像在博客园不支持)
横屏滑动片(微信公众号支持。博客园不支持)

<![蓝1](https://markdown.com.cn/images/blue.jpg),![绿2](https://markdown.com.cn/images/green.jpg),![红3](https://markdown.com.cn/images/red.jpg)>

<蓝1,绿2,红3>

支持原生html格式

<span style="display:block;text-align:right;color:orangered;">橙色居右</span>
<span style="display:block;text-align:center;color:orangered;">橙色居中</span>

橙色居右
橙色居中


  1. This is the footnote. ↩︎

posted @ 2023-11-11 22:53  infocodez  阅读(5)  评论(0编辑  收藏  举报