Markdown 语法

目录

块元素

标题

使用#可以表示1~6级标题(h1~h6),## header2 等同于与 <h2>header</h2> 效果如下:

header2

段落

段落<p>是一个或多个连续的文本行,可以用一个或多个空行(blank lines)分隔。(空行只有制表符tab和空格space,不包含其他字符)。正常段落不应该用空格或制表符缩进,可以使用两个及以上的回车来换行<br> 效果如下:

这是第一行

这是第二行

块引用

markdown使用>标识块引用(BLOCKQUOTES),最好在每行的开头都加上>

>BLOCKQUOTES
>BLOCKQUOTES BLOCKQUOTES
>
>BLOCKQUOTES

效果如下

BLOCKQUOTES
BLOCKQUOTES BLOCKQUOTES

BLOCKQUOTES

偷懒的话,放在段落<p>的第一行也是可以的

>BLOCKQUOTES
BLOCKQUOTES BLOCKQUOTES
>
>BLOCKQUOTES

这样写和上面的效果是一样的

列表

无序列表<ul>,使用-,例如:

- list1
- list2
- list3

效果如下:

  • list1
  • list2
  • list3

有序列表<ol>,使用 1.,例如:

1. list1
1. list2
1. list3

效果如下:

  1. list1
  2. list2
  3. list3

代码块

代码块(code block) ,<per><code> this is code<per><code>,单行使用`,多行使用```

单行注释demo:

`System.out.println("Hello World!")`

效果

System.out.println("Hello World!")

多行注释demo:

 ```java
 public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }
 ```

效果:

public void setUserMapper(UserMapper userMapper) {
       this.userMapper = userMapper;
   }

分割线

分割线<hr>,使用三个及以上的-,例如:

---

效果如下:


字体

qwerqw
my
粗体

  • list item 1
  • list item 2
  • list item 3
  1. Do this.
  2. Do that.
  3. Done

h2

  1. a
  2. 2
  3. 3
  • h

引用

  • h

a


转义

  1. \
  2. `
  3. ~
  4. *
  5. _
  6. -
  7. +
  8. .
  9. !

删除

delete this

<div class="container">this is containter<div>

 public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

Markdown

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Markdown语法总结 一.标题 1. 两个= 或者两个- 对应1、2阶标题 对应效果: This is an ...
    WillBetterMan阅读 4,028评论 0 0
  • 参考文章:Markdown 语法说明 (简体中文版) 概述 兼容 HTML 不在 Markdown 涵盖范围之内的...
    Bwing阅读 4,455评论 0 3
  • Markdown 语法 之剑 2016.5.3 23:41:46 hljs.initHighlightingOnL...
    光剑书架上的书阅读 5,540评论 1 5
  • << 访问 Wow!UbuntuNOTE: This is Simplelified Chinese Editio...
    Xiaosonl阅读 5,101评论 0 2
  • 生活中要面对很多不同的声音,有反对的,支持的,而我们最终是选择坚持做自己还是迎合别人,值得自己去深思。 在面临很多...
    单单R阅读 1,267评论 0 0