Can I mix and match rel attributes?

二次信任 提交于 2020-01-15 06:28:47

问题


I'm a little confused by the rel attribute usage.

Individually I understand rel="author", rel="me" and rel="publisher", however I am wondering if I can mix and match attribute values.

Example 1: On my website, I have a link in the footer which links to my domain. Do I add rel="me", rel="author" or rel="me author"?

Example 2: On my website I have a link to my twitter account. Do I add rel="me" or rel="me publisher"?


回答1:


You can't add more than one rel attribute into one HTML element, but you can insert more than one argument into one rel attribute value - just delimit them with a space:

<a rel="me author" href="my_page">
<a rel="me publisher" href="twitter_link">



回答2:


Last time I looked the Google rich snippet tool complained if you had both author and publisher mark-up on the same page.

If I remember correctly, author beats publisher



来源:https://stackoverflow.com/questions/9402545/can-i-mix-and-match-rel-attributes

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