a标签rel_rel标签的进一步用途

a标签rel

Most web developers use the <link> tag and the rel attribute just twice per page: to bring in an external style sheet and load a favicon. But rel actually has many uses. In previous articles I’ve talked about using the tag to indicate the next and previous logical pages, and to preload content, but rel can be used for far more. Some examples:

大多数Web开发人员每页仅使用<link>标记和rel属性两次: 引入外部样式表加载favicon 。 但是rel实际上有很多用途。 在之前的文章中,我曾讨论过使用标记来指示下一个和上一个逻辑页面以及预加载内容,但是rel可以用于更多内容。 一些例子:

rel="archives" rel =“ archives”
<a rel="archives" href="archives.php">Articles</a>
rel=external rel =外部
outside the current domain. It is useful for adding to comments (as you can set up 之外 。 这对于添加注释非常有用(因为您可以设置 robots.txt filerobots.txt文件, rel=nofollow might be used for the same reason), and for presenting external links differently in rel=nofollow ),并用于显示外部链接在 CSS or CSSJavaScript by using an JavaScript中使用 attribute selector. 属性选择器有所不同。
rel="license" rel =“ license”
Indicates the conditions of a license governing the uses and permissions of site content. Associated with Creative Commons but supported by other license systems. May be used in the <head> as <link />, or an <a> element in the <body>.
指示用于管理网站内容使用和许可的许可证条件。 与 知识共享相关,但受其他许可证系统支持。 可以在 <head>用作 <link />或在 <body>.使用 <a>元素 <body>.
rel="search" rel =“ search”
OpenSearch.org format. OpenSearch.org格式的搜索文档。
rel=first,last,up rel =第一,最后,向上
next and nextprev values mentioned above, prev值之外, first, firstlast and lastup define appropriate resources in a sequence that could be appreciated linearly. (Think first and last articles and in blog). “ up定义了可以线性理解的序列中的适当资源。 (请考虑第一篇和最后一篇文章以及博客)。 最好将“ up" is perhaps best understood as a shortcut for “home”, but could also be used to indicate “go up a level” in a site organized on a hierarchical model. up ”理解为“ home”的快捷方式,但也可以用来表示在按层次结构模型组织的站点中的“上一级”。
rel="me" rel =“ me”
<a rel="me" href="https://plus.google.com/115433388220321744732">
Dudley Storey</a>

翻译自: https://thenewcode.com/411/Further-uses-for-the-rel-tag

a标签rel

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值