Html 我应该使用 <meta name="author" content="Your Name" /> 还是 <link rel="author" href="http://mysite.com/about/" /> ?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5125856/
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 06:57:24  来源:igfitidea点击:

Should I use <meta name="author" content="Your Name" /> or <link rel="author" href="http://mysite.com/about/" />?

htmlseosemantic-webmeta-tags

提问by Donald Jenkins

In html 5, rel="author"is used to link to information about the author of the page. This can be a mailto:address, though it doesn't have to be. It could simply link to a contact form or "about the author" page (I personally wouldn't want to provide email for obvious reason).

在 html 5 中,rel="author"用于链接到有关页面作者的信息。这可以是一个mailto:地址,尽管它不是必须的。它可以简单地链接到联系表格或“关于作者”页面(出于明显的原因,我个人不想提供电子邮件)。

Until now, I've been using the meta authorattributeto do effectively the same thing—although the advantage of the new html 5 specification is that you can provide more than just a name, but also a link where further information about you is provided.

到现在为止,我一直在使用metaauthor属性来有效地做同样的事情——尽管新的 html 5 规范的优点是您不仅可以提供名称,还可以提供一个链接,其中提供了有关您的更多信息。

It seems, based on another answeron Stack Overflow, that Google, Yahoo, and MSN do not index the <meta>author tag [source]. It suspect they don't currently index rel="author"either.

根据Stack Overflow上的另一个答案,Google、Yahoo 和 MSN似乎没有将<meta>作者标签 [来源] 编入索引。它怀疑他们目前也没有索引rel="author"

Would it make sense to provide both? Or is it pointless to worry about this at present?

提供两者是否有意义?或者现在担心这个是没有意义的?

采纳答案by Boris Guéry

Behind the war between search engines, are kind of "proprietaries metas", then I'll go for both. Search engine should not blame you to use both until you're not trying to do some spam indexing.

搜索引擎之间的War背后,是一种“专有元”,那么我会两者兼而有之。搜索引擎不应该责怪您同时使用两者,除非您不尝试进行垃圾邮件索引。

Depending on what is the purpose of your content, there are specific meta used in different contexts.

根据您的内容的目的是什么,在不同的上下文中使用了特定的元。

Google Scholar Metadata

谷歌学术元数据

Let you use:

让你使用:

<meta name="citation_authors" content="Donald Jenkins">
<meta name="citation_keywords" content="html5 html meta-tags">

There is also Dublin Core Meta Data Initiative, which provides a complete set of metadata for authoring, etc.

还有都柏林核心元数据倡议,它提供了一套完整的元数据,用于创作等。

Not a medata but still interesting to provide personnal informations, the hcard microformat, it uses plain and semantic html to provide vcard, in a format which can be parsed by other engine.

不是元数据,但提供个人信息仍然很有趣,hcard 微格式,它使用纯文本和语义 html 以可以被其他引擎解析的格式提供 vcard。

Example of hcard:

hcard 示例:

<div class="vcard">
 <a class="url fn n" href="http://borisguery.com/">
  <span class="given-name">Boris</span> 
  <span class="family-name">Guéry</span>
 </a>
</div>