【问题标题】:there is no attribute "property" in facebook meta tag in validation w3c验证 w3c 中的 facebook 元标记中没有属性“属性”
【发布时间】:2011-09-04 05:46:30
【问题描述】:

我们可以使用meta name="fb:admins" 代替 meta property="fb:admins" 用于 w3c 验证??

【问题讨论】:

标签: facebook validation admin meta-tags


【解决方案1】:

我正在回答这个问题,尽管这是一个老问题,因为我认为这对未来想要了解这方面信息的人来说很有价值。当 Evan 说它不会通过验证时,他可能是对的,但我认为答案是您想保留 property="" 属性。取自old Facebook developer forum post concerning this question exactly,结果证明您的文档应该是 XHTML + RDFa 文档。由于DOCTYPE 声明,这将在 W3C 中得到验证:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
    version="XHTML+RDFa 1.0"
    xmlns:og="http://ogp.me/ns#"
    xml:lang="en">
  <head>
    <title>Virtual Library</title>
    <meta property="og:title" content="My Website"/>
  </head>
  <body>
    <p>Moved to <a href="http://example.org/">example.org</a>.</p>
  </body>
</html>

您可以在W3C spec for RDFathis specific example of &lt;meta property=""/&gt; 中找到更多信息。

【讨论】:

    【解决方案2】:

    不,你只会得到这个:

    Line 1, Column 123: Bad value fb:app_id for attribute name on element meta: Keyword fb:app_id is not registered.
    …="fb:app_id" content="176557225718913"><meta charset="utf-8"><meta name="descr…
    Syntax of metadata name:
    A metadata name listed in the HTML specification or listed in the WHATWG wiki. You can register metadata names on the WHATWG wiki yourself.
    

    【讨论】:

      猜你喜欢
      • 2013-04-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-07
      • 1970-01-01
      • 2017-06-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多