markdown 链接方式

本文详细解析了Markdown中四种链接的使用方法:目录形式、行内链接、参考样式链接及脚注,通过实例展示了每种链接的具体应用,帮助读者掌握Markdown写作技巧。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

MarkDown 链接方式

1. 目录形式

@[toc]

效果如本文的目录样式

2. 行内链接 Inline-style links1

  • 带标题

     This is [an example](http://example.com/ "这是标题") inline link.
    

    效果:
    This is an example inline link.

  • 不带标题

      [This link](http://example.net/) has no title attribute.
    

    效果:
    This link has no title attribute.

3. 参考样式链接 Reference-style links1

This is [an example][id2] reference-style link.

[id1]: http://example.com/  "Optional Title Here"
[ID2]: http://example.com/  "Optional Title Here"
[Id3]: http://example.com/  'Optional Title Here'
[id4]: http://example.com/  (Optional Title Here)

效果:

This is an example reference-style link.

隐式链接名

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

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

效果:
I get 10 times more traffic from Google than from
Yahoo or MSN.

备注:

链接名(id1,id2等)不区分大小写

4. 脚注 footnote2

You can create footnotes like this[^foot].

[^foot]: Here is the *text* of the **footnote**.

效果:

You can create footnotes like this3.

本文的引用也是采用这种形式


  1. Markdown API ↩︎ ↩︎

  2. 将Markdown行内式链接转为文末参考式链接 ↩︎

  3. Here is the text of the footnote. ↩︎

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值