Markdown学习笔记

兼容模式和引用

  1. 当发表文章时,该模板是同时兼容html和Markdown的。比如直接加入html格式链接:<a href="#">我是一条链接</a>,或者Markdown格式链接:[我是另一条链接](#)

  2. 引用文字采用>标志开头。比如下面的一段话就是我们引用的文字:

Curabitur blandit tempus porttitor. Nullam quis risus eget urna mollis ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.

斜体和粗体

  1. 对于段落中的文字斜体可以用一个星号将需要变斜体的文字围住。比如:*我是斜体的文字*我是斜体的文字

  2. 当需要加粗部分文字时,可以左右用两个星号将需要加粗的文字围住。比如:**我是粗体**我是粗体

  3. 标题级别通过井号来引用,井号的个数越多,表示级别越低。
    比如:##二级标题

二级标题

内嵌式文本

列表可以通过行首加入横杠来引用-

  • 加粗字体使用html中的<strong>
  • 使字体倾斜采用<em>
  • 略缩词,鼠标滑过时显示全名。HTML格式下可以采用<abbr title="HyperText Markup Langage">HTML</abbr>, Markdown同样可以采用。例如:<abbr title="HyperText Markup Langage">HTML</abbr>
  • 引用词语,HTML格式下采用<cite>&mdash; Mark otto</cite>, Markdown同样可以采用。例如:<cite>— Mark otto</cite>
  • 删除线,HTML格式下采用<del>Deleted</del>, 例如:<del>Deleted</del>;下划线,HTML格式下采用<ins>inserted</ins>, 例如:<ins>inserted</ins>
  • 上标采用<sup>text</sup>, 例如:文字上标; 下标采用<sub>text</sub>, 例如:文字下标

代码引用

代码的引用通常可以采用反引号来将所需要引用的代码围住。
例如:printf("hello, world!\n")
或者在Jekyll的环境下加入你要引用的YAML的语法:

{% highlight js %}
// Example can be run directly in your JavaScript console
// Create a function that takes two arguments and returns the sum of those arguments
var adder = new Function("a", "b", "return a + b");
// Call the function

adder(2, 6);
// > 8
{% endhighlight %}

Jekll 下还支持HTML的列表标题内容的标签<dl><dt></dt><dd></dd></dl>
例如自动缩进的效果:

<dl> <dt>HyperText Markup Language (HTML)</dt> <dd>The language used to describe and define the content of a Web page</dd> <dt>Cascading Style Sheets (CSS)</dt> <dd>Used to describe the appearance of Web content</dd> <dt>JavaScript (JS)</dt> <dd>The programming language used to build advanced Web sites and applications</dd> </dl>
<dl>
<dt>HyperText Markup Language (HTML)</dt>
<dd>The language used to describe and define the content of a Web page</dd>
<dt>Cascading Style Sheets (CSS)</dt>
<dd>Used to describe the appearance of Web content</dd>
<dt>JavaScript (JS)</dt>
<dd>The programming language used to build advanced Web sites and applications</dd>
</dl>

图片

图片的链接和链接非常相似,只是在前面加入了一个感叹号,例如:

![图片名](http://placehold.it/800x400 "图片说明") ![placeholder](http://placehold.it/800x400 "Large example image") ![placeholder](http://placehold.it/400x200 "Medium example image") ![placeholder](http://placehold.it/200x200 "Small example image")

placeholder
placeholder

placeholder
placeholder

placeholder
placeholder

表格

表格的形式完全支持HTML的表格标签,例如:

<table>
<thead>
<tr>
<th>姓名</th>
<th>支持</th>
<th>反对</th>
</tr>
</thead>

<tfoot>
<tr>
<td>总数</td>
<td>21</td>
<td>23</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>小爱</td>
<td>10</td>
<td>11</td>
</tr>
<tr>
<td>小博</td>
<td>4</td>
<td>3</td>
</tr>
<tr>
<td>小李</td>
<td>7</td>
<td>9</td>
</tr>
</tbody>
</table>

姓名 支持 反对
小爱 10 11
小博 4 3
小李 7 9
总数 21 23

如果你还想了解更多,就赶快亲自<a href="http://mahua.jser.me/">试试吧</a>.

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

推荐阅读更多精彩内容

  • 为什么学习Markdown 自从搭建了 Hexo 博客之后,发现还有 Markdown 这种写文章的方法,想到以后...
    lifeColder阅读 20,203评论 10 216
  • Markdown的学习笔记 引用 普通引用在被引用的语句前添加>符号。> 被引用的语句 被引用的语句 嵌套引用: ...
    qin7zhen阅读 298评论 2 5
  • Markdown 学习笔记·入门 花一点点时间了解了下Markdown的语法,确实非常简单,这里做下总结,也算是对...
    fantasykai阅读 551评论 0 0
  • 简介 Markdown是一种可以使用普通文本编辑器编写的标记语言,通过类似HTML的标记语法,它可以使普通文本内容...
    cd2016阅读 549评论 0 2
  • 最好的月光 /小聪 听见夜的酣声 关上了盼望的门 这个夜晚 依然写满了宁静 微风凌乱了谁的深情 闪烁的星光 孜孜不...
    令狐小聪阅读 254评论 0 0