问题
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