day1:Markdown基础知识(优缺点、链接、强调、标记代码块、图片)
Markdown基础知识
- Markdown的优点
1、专注文字内容
2、可导出多格式:HTML、PDF、.md文件
3、纯文本内容,兼容所有的文本编辑器与字处理软件
4、简洁、高效,易读易写
- Markdown链接
行内式链接:
输入:This is an example inline link.
效果:This is an example .
html:
This is an example inline link.
输入:This is has no title attribute.
效果:This is has no title attribute.
html:
This link has no title attribute.
参考式链接
输入:This is [an example][id] reference-style link.
输入:This is [an example] [id] reference-style link.
空格+[id]
[id]: http://www.baidu.com/ "optional Title Here"
[id]: http://www.baidu.com/ 'optional Title Here'
[id]: http://www.baidu.com/ (optional Title Here)
[id]: http://example.com/ "Optional Title Here"
[id]: http://example.com/longish/path/to/resource/here
"Optional Title Here"
效果:This is **an example ** reference-style link.
输入:baidu
输入1:
I get 10 times more traffic from Google 1 than from
Yahoo 2 or MSN 3.
输入2
I get 10 times more traffic from Google than from
Yahoo or MSN.
HTML:
I get 10 times more traffic from Google than from Yahoo or MSN.
参考式链接字符更少,阅读效果更好。
- Markdown 强调
输入:bai du
输入:bai du bai
效果:倾斜
输入:bai du
输入:bai du bai
效果:加粗
html
single asterisks
single underscores
double asterisks
double underscores
文字前后加入普通*和_,可用反斜线
输入:*bai du bai du*
效果:bai du bai du
- 标记代码
输入:Use theprintf()funtion.
效果:Use the <printf()> funtion.
html:Use the
printf()function.
输入:There is a literal backtick(`) here.
效果:There is a literal backtick() here. html: <p><code>There is a literal backtick () here.
输入:
A single backtick in a code span: `
A backtick-delimited string in a code span: `foo`
效果:
A single backtick in a code span: A backtick-delimited string in a code span:foo`
html:
A single backtick in a code span: `
A backtick-delimited string in a code span: `foo`
输入:Please don't use any <blink> tags.
效果:Please don't use any
Please don't use any <blink> tags.
输入:— is the decimal-encoded equivalent of —.
效果:— is the decimal-encoded equivalent of —.
html:
— is the decimal-encoded equivalent of —.
- 图片
![Alt text]()
![Optional title Alt text]()
![Alt text][id]
[id]:url/to/imge "Optional title attribute"


浙公网安备 33010602011771号