What rel=profile is for?

我们两清 提交于 2019-12-17 22:38:55

问题


While doing the HTML for my new template, I stumbled across a new meta tag

<link rel="profile" href="http://gmpg.org/xfn/11" />

What's this for? I found it linking to this page, and through Google I found this Microformat but I didn't get it.


回答1:


In HTML 4.01, there is the profile attribute for the head element:

This attribute specifies the location of one or more meta data profiles, separated by white space. For future extensions, user agents should consider the value to be a list even though this specification only considers the first URI to be significant.

It is used to link to meta data profiles.

In HTML5, the profile attribute was dropped.

As an alternative to it, the rel value profile could be used (with several advantages over the profile attribute). RFC 6906 describes the "profile Link Relation Type".

An example format for such meta data profiles (whether for the profile attribute or the rel value) is XMDP: XHTML Meta Data Profiles. It is defined at http://gmpg.org/xmdp/:

a simple XHTML-based format for defining HTML meta data profiles easy to read and write by both humans and machines


In your example, the profile for XFN is used, the Xhtml Friends Network (archive.org link):

a simple way to represent human relationships using hyperlinks



来源:https://stackoverflow.com/questions/16636870/what-rel-profile-is-for

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