如何在HTML中创建脚注的链接? [英] How do I create a link to a footnote in HTML?

查看:249
本文介绍了如何在HTML中创建脚注的链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如:


这是我内容的主体。这条线[1]有一个
的脚注链接。然后,我还有更多的
内容。有些是有趣的,它
也有一些脚注[2]。

[1]这是我的第一个脚注。



[2]另一个脚注。

所以,如果我点击[1]链接它将网页指向第一个脚注参考,等等。如何在HTML中完成这项工作?

解决方案

给一个容器一个id,然后用#来引用该id。 / p>

例如

 这是我内容的主体。我对此行< a href =#footnote-1> [1]< / a>有脚注链接。然后,我有更多的内容。其中一些内容很有趣,它也有一些脚注< a href =#footnote-2> [2]< / a> ;. 

< p id =footnote-1> [1]这是我的第一个脚注。< / p>
< p id =footnote-2> [2]另一个脚注。< / p>


For example:

This is main body of my content. I have a footnote link for this line [1]. Then, I have some more content. Some of it is interesting and it has some footnotes as well [2].

[1] Here is my first footnote.

[2] Another footnote.

So, if I click on the "[1]" link it directs the web page to the first footnote reference and so on. How exactly do I accomplish this in HTML?

解决方案

Give a container an id, then use # to refer to that Id.

e.g.

This is main body of my content. I have a footnote link for this line <a href="#footnote-1">[1]</a>. Then, I have some more content. Some of it is interesting and it has some footnotes as well <a href="#footnote-2">[2]</a>.

<p id="footnote-1">[1] Here is my first footnote.</p>
<p id="footnote-2">[2] Another footnote.</p>

这篇关于如何在HTML中创建脚注的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆