MarkDown语法

MarkDown基础语法

基础语法

标题

1
2
3
# This is an <h1> tag
## This is an <h2> tag
### This is an <h3> tag

This is an <h1> tag

This is an <h2> tag

This is an <h3> tag

加粗/斜体/删除线

斜体

1
2
*This text will be italic*
_This text will be italic_

This text will be italic
This text will be italic

加粗

1
2
**This text will be blod**
__This text will be blod__

This text will be blod
This text will be blod

组合

You can combine them

列表

有序

1
2
3
4
1. Item1
1. Item2
1. Item2a --一个Tab
1. Item2b
  1. Item1
  2. Item2
    1. Item2a –一个Tab
    2. Item2b

      无序

  • Item1
  • Item2
    • Item2a
    • Item2b

      图片

      1
      2
      ![CSDN Logo](/images/logo.png)
      Formate:![Alt Text](url)

CSDN Logo

链接

1
2
[GitHub](http://github.com) -automatic!
Formate:[Text](url)

GitHub -automatic!

引用

1
2
3
4
As Kanye West said:

> We're living the future so
> the present is our past.

As Kanye West said:

We’re living the future so
the present is our past.

行内代码

1
I think you should use an `<addr>` element here instead.

I think you should use an <addr> element here instead.

语法高亮

1
2
3
4
5
function fancyAlert(arg) {
if(arg) {
$.facebox({div:'#foo'})
}
}

使用四个空格

function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }
}

任务列表

1
2
3
4
- [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported
- [x] list syntax required (any unordered or ordered list supported)
- [x] this is a complete item
- [ ] this is an incomplete item
  • @mentions, #refs, links, formatting, and tags supported
  • list syntax required (any unordered or ordered list supported)
  • this is a complete item
  • this is an incomplete item

    表格

    1
    2
    3
    1|列b
    -|-
    adjfadofafoa|dfasdfjkladfjajkkfklas
列1 列b
adjfadofafoa dfasdfjkladfjajkkfklas

参考链接

参考Github MarkDown语法