HTML 中的导航/链接

发布于 2024-10-20 00:10:16 字数 81 浏览 4 评论 0原文

Hoe moet je 链接在 html 中制作吗?恩维德?


如何在html中制作导航链接?

Hoe moet je link maken in html? en verder?


How to make navigation link in html?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

我乃一代侩神 2024-10-27 00:10:16
<a href="http://stackoverflow.com/questions/5171968/navigatie-links-in-html">woco's link</a>
<a href="http://stackoverflow.com/questions/5171968/navigatie-links-in-html">woco's link</a>
花期渐远 2024-10-27 00:10:16

正如我从你原来的帖子中了解到的:

<a href="link.html">This is a link</a>

As I understood from your original post:

<a href="link.html">This is a link</a>
爱格式化 2024-10-27 00:10:16

创建文本链接

<a href="targetpage.html">Your Link</a>

创建图像链接

<a href="targetpage.html">
  <img src="image-file.jpg">
</a>

To create a text link

<a href="targetpage.html">Your Link</a>

To create an image link

<a href="targetpage.html">
  <img src="image-file.jpg">
</a>
顾铮苏瑾 2024-10-27 00:10:16

我想我们可以做一个更长的解释。

链接的形式为 caption。这才是看待事物的最简单的方式。 target 可以是多种内容:

现在,正如其他人所观察到的,标题可以包含其他项目。字面上的任何内容,例如

  • 。最后一个案例为您提供了一种创建 css 菜单的方法;如何做到这一点是另一个问题,但重点是,这非常强大。
  • 还有一些其他属性,具体来说target最常用的是target="_blank",它要求浏览器打开一个新窗口。您也可以将其与 html 框架一起使用,但如果您不知道框架是什么,请忘记我提到过它们。真的。

    I think we can manage a longer explanation.

    A link takes the form <a href="target">caption</a>. That's the really simplistic way to look at things. target can be a number of things:

    • An anchor within the current document. So if you, at some point on the page, write <a name="anchor"> then <a href="#anchor">go to anchor</a> takes you there. In XHTML this should be <a id="anchor"/> rather than name. This is, in my opinion, one of the overlooked features of html, originally designed to make navigating documents easier.
    • It can be an absolute URI, like mailto:[email protected] or ftp://downloads.somesite.com. It doesn't have to be http:// although the most common use is with http. You are free, in fact, to use file://.
    • It can be a relative URI. So for example you might link to <a href="../users">Users</a> in which case stackoverflow.com/questions/123456 would go to stackoverflow.com/users.
    • If you specify <base href="http://someurl" /> then everything in terms of relative addressing, the point above, becomes relative to that base I believe. I don't use it much.

    Now, as others have observed, caption can contain other items. Literally anything, say <img/> or <div></div> or <li>. The last case gives you a way to create css menus; how to do that is another question, but the point is, this is pretty powerful.

    <a> has some other properties, specifically target The most commonly used one is target="_blank" which asks the browser to open up a new window. You can use this with html frames too, but if you don't know what frames are, forget I mentioned them. Really.

    ~没有更多了~
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文