Meaning of Rel atttibute

十年热恋 提交于 2019-12-24 15:18:38

问题


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

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

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

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


回答1:


The rel attribute specifies the link relationship type.

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.

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

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.




回答2:


Per the tag wiki: The rel attribute is used in HTML elements to specify the relationship and connection between the current document and the linked document.

Sources: W3C (link)

Source: W3Schools (link)



来源:https://stackoverflow.com/questions/19844131/meaning-of-rel-atttibute

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!