Rel atttibute的含义 [英] Meaning of Rel atttibute

查看:185
本文介绍了Rel atttibute的含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网页上发现了一个奇怪的 a href 。它看起来像

I found a strange a href in a webpage. It looks like

<a href=... rel="servername.com|6d63402c" ...other properties... ></a>

隐秘的 | 6d63402c是什么意思?它是一个按位 OR 操作还是只是一个字符串?

What does cryptic |6d63402c mean ? Is it a bitwise OR operation or just a string?

该文档包含具有此样式的不同rels的不同链接。

The document contains different links with different rels in this style.

推荐答案

rel 属性指定链接关系类型。

The rel attribute specifies the link relationship type.

在HTML5中,您只能使用 rel

In HTML5 you may only use rel values that

  • are defined in the HTML5 specification, or
  • are registered in the Microformats wiki page existing rel values: HTML5 link type extensions.

作为值 servername.com | 6d63402c 未定义/注册,页面使用无效标记。

As the value servername.com|6d63402c is not defined/registered, the page uses invalid markup.

关于什么这个特定值确实:我们无法知道(好吧,因为它没有定义/注册)。它可能是一些使用它的内部或第三方脚本。他们应该更好地使用数据 - * 属性,而不是滥用 rel

As to what this specific value does: we can’t know (well, because it is not defined/registered). It’s probably some internal or third-party script that makes use of it. They should better use the data-* attribute instead of misusing rel.

这篇关于Rel atttibute的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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