Markdown语法一页纸总结

来源:互联网 发布:js实现全景图 编辑:程序博客网 时间:2024/05/16 00:54
H1标题 <h1>
H1标题[换行]----- or # H1标题
H2标题 <h2>
H2标题[换行]===== or ## H2标题
段落 <p>

连续的多行为一个段落(不进行换行!),段落间用空行分隔
换行 <br/>
在行末加上2个空格
水平分割线 <hr/>
- - - or * * *
斜体 <i>
*斜体*
粗体 <b>
**粗体**
粗斜体 <i><b>
***粗斜体***
删除线 <del>
~~删除内容~~
上标 <sup>
正常内容^上标内容

若上标内容有空格:
正常内容^(上标内容)
代码 <code>
`代码`
代码段 <pre><code>
[tab/4空格]代码
块引用 <blockquote>
> 第一行内容
> 第二行内容
>> 嵌套块引用

▷ 可嵌套任意层数
多个连续的块引用会被连成一个块引用,即使中间有空行
无序列表 <ul><li>
* 表项
    * 子表项

▷ */+/-这三个符号功能一样 可混用
有序列表 <ol><li>
1. 表项

▷ 有序无序列表在同一层级不可混用
▷ 但可互相嵌套(见高级玩法)
链接 <a>
[链接文字](链接地址)

[谷歌](https://www.google.com.hk/)
引用链接
[链接文字][链接引用标签]
[链接引用标签]: 链接地址

or
[链接文字][链接引用标签]
[链接引用标签]: (链接地址 "提示信息")

[百度][b2]
... ...
[b2]: (http://www.baidu.com/ "buKengDie")
图片 <img>
![标签](链接)

![asuka](http://i2.pixiv.net/img54/img/asukaziye/mobile/40099644_240mw.jpg)
转义符号 \
转义的* \*


-----------------
高 * 级 * 玩 * 法
-----------------


表格
some|header|labels:---|:--:|---:Left-justified|center-justified|right-justifieda|b|cd|e|f
每一行用分隔成一个个cell
第一行是表头
第二行是整个表格magic的关键,规定每一列的对齐方式
:---左对齐 :--:居中---:右对齐
不用全部规定对齐方式,默认左对齐
最简单的第二行写法  -|
以下每一行是表格数据,不用对齐,只要每行数相同即可
有序列表嵌套无序列表
1. Lists in a list item:    - Indented four spaces.        * indented eight spaces.    - Four spaces again.2. Blockquotes in a list item:    > Skip a line and    > indent the >'s four spaces.3. Preformatted text in a list item:        Skip a line and indent ***eight*** spaces.        That's four spaces for the list        and four to trigger the code block.

块引用里面嵌套
> - A list in a blockquote> - With a > and space in front of it>    * A sublist----->     Indent ***five*** spaces total. The first>     one is part of the blockquote designator.

参考资料
维基中文
Wikipedia
stackoverflow
Reddit


0 0
原创粉丝点击