美文网首页
markdown标准语法总结

markdown标准语法总结

作者: hp简书 | 来源:发表于2016-08-31 18:16 被阅读693次

本文参考markdown软件的使用说明完成,包含了所有standard syntax

引用,以及引用嵌套

This is the first level of quoting.

This is nested blockquote.

Back to the first level.

换行

这是第一行 (在行尾打两个空格,按回车)
就换到第二行

引用块包含其他elements

This is a header.

  1. This is the first list item.
  2. This is the second list item.

Here's some example code:

return shell_exec("echo $input | $markdown_script");

LISTS

  1. 无顺序的list 可用 * + - 三者等价
  • red
  • green
  • blue
  • red
  • green
  • blue
  • red
  • green
  • blue
  1. 有顺序的就用 数字+点号

    1. red
    2. green
    3. blue
  2. list标志后面至少要有一个空格,或者tab

  3. list当中放置引用块

    这是引用块
    在list中

  4. list中放代码,中间要多一个空行,代码块前需要 8 spaces or two tabs

    System.out.println("Hello,world");
    
  5. 特殊情况(转义字符)
    1996. what a great reason

代码块

  1. 只需前面加4 spaces or 1 tab,注意前面最好有空白行,以去除前面格式的影响

    Tiis is a normal paragraph.

     this is a code 
      tell app "Foo"
         beep 
     end tell 
    
  2. 备注 在code块中,一些引用不在作为markdown语法,例如加粗会原样显示为 **加粗**

代码

代码块和代码还是不同的,代码可能只是一行中的某几个字,可以用`(键盘右上角与~一起的符号)来完成

printf 来打印
作为一行 There is a literal backtick (`) here.
嵌套eg: backtick-delimited string in a code span: `foo`

横线

  1. 下面的几种标记都只用来产生横线的
---
* * *
- - -
****

链接

  1. LINK 分为两类 inline and reference 链接都是用 [ ] 来界定的
  2. 创建一个inline 只需在[]后紧跟(url)就行
这是[百度](https://www.baidu.com)的网址

也可以分开完成  
点击进入[简书][]

I get 10 times more traffic from [Google][] than from
[Yahoo][] or [MSN][].

这些网址定义一般放在文章结尾即可
[简书]: http://www.jianshu.com
[google]: http://google.com/ "Google"
[yahoo]: http://search.yahoo.com/ "Yahoo Search"
[msn]: http://search.msn.com/ "MSN Search"

强调

markdown用 * 和 _ 表示强调,快捷键ctrl+b

single asterisks

single underscores

double asterisks

double underscores

还可以用在单词的任意位置 unfriggingbelievable

图片

  1. 本地图片很少使用,因为没有可移植性,要用相对地址,这里我的图片和本文放在同一文件夹中
![本地图片](11.png)  
  1. 网络图片,()中放url地址即可,置于怎么把图片传到服务器(生成url地址),只要找个网站能上传自己的图片就行,最简单就是qq空间了(右键图片-->赋值图片地址)

    qq空间图片qq空间图片

相关文章

网友评论

      本文标题:markdown标准语法总结

      本文链接:https://www.haomeiwen.com/subject/wyfcettx.html