Html rel=profile 是干什么用的?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16636870/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 08:32:45  来源:igfitidea点击:

What rel=profile is for?

htmlrelationshiprelmicroformats

提问by Omar Abid

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

在为我的新模板做 HTML 时,我偶然发现了一个新的元标记

<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 Microformatbut I didn't get it.

这是用来干嘛的?我发现它链接到这个页面,通过谷歌我找到了这个微格式,但我没有得到它。

采纳答案by unor

In HTML 4.01, there is the profileattributefor the headelement:

在HTML 4.01,有profile属性head元素:

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.

该属性指定一个或多个元数据配置文件的位置,由空格分隔。对于未来的扩展,用户代理应该将值视为一个列表,即使本规范仅认为第一个 URI 是重要的。

It is used to link to meta data profiles.

它用于链接到元数据配置文件

In HTML5, the profileattribute was dropped.

在 HTML5 中,该profile属性被删除

As an alternative to it, the relvalue profilecould be used (with several advantagesover the profileattribute). RFC 6906describes the "profileLink Relation Type".

作为它的替代方案,可以使用该relprofile(与该属性相比几个优点profile)。RFC 6906描述了“profile链接关系类型”。

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

此类元数据配置文件(无论是profile属性还是rel值)的示例格式是XMDP:XHTML 元数据配置文件。它在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

一种简单的基于 XHTML 的格式,用于定义人和机器都易于读写的 HTML 元数据配置文件



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

在您的示例中,使用了 XFN 的配置文件,即Xhtml Friends Network(archive.org 链接)

a simple way to represent human relationships using hyperlinks

一种使用超链接表示人际关系的简单方法