Markdown 标记语言指南


发明者

Markdown 的发明者是 John Gruber 和 Aaron Swartz,目标是 “to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)"。

John Gruber 是一个作家,有计算机学士学位,苹果迷。他最有名的一个项目是 Daring Fireball 网站,一个主要写苹果产品相关信息的技术博客,从2006年4月开始,他全职维护此网站。

Aaron Swartz 是一个非常年轻有为的家伙,一大把的经历和成绩。他的个人网站里列出了他的所有成绩。

语法

标题

列表

链接

行内:

This is an [example link](http://example.com/ "With a Title").

引用:

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

[1]: http://google.com/        "Google"
[2]: http://search.yahoo.com/  "Yahoo Search"
[3]: http://search.msn.com/    "MSN Search"

自动:用括号将链接或email地址括起来,就会自动生产链接。

图片

行内:

![alt text](/path/to/img.jpg "Title")

引用:

![alt text][id]

[id]: /path/to/img.jpg "Title"

代码

使用backtick quotes(`)。

缩进四个字符或者一个tab。

引用

就像电子邮件里一样,使用大于号(>)。

> This is a blockquote.
>
> This is the second paragraph in the blockquote.
>
> ## This is an H2 in a blockquote

强调

星号(*)或者下杠(_),一个星号代表斜体,两个星号代表粗体,三个星号是斜粗体,下杠一样。

横线

三个或三个以上的中杠(-),星号(*),下杠(_),产生一个<hr /> tag,也就是一条横线。

转义

可以对如下字符进行转义:

参考