元标签属性错误
我试图放置元数据:
<meta property="og:type" content="website"/>
<meta property="og:title" content="one title"/>
<meta property="og:image" content="image.jg"/>
<meta property="og:description" content="news portal"/>
但我有错误: 错误 6 验证(XHTML 1.0 Transitional):属性“property”不是元素“meta”的有效属性。
我的文档类型是:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
我不知道如何解决此错误,因为无法识别此属性。 谢谢。
Im trying to put the metas:
<meta property="og:type" content="website"/>
<meta property="og:title" content="one title"/>
<meta property="og:image" content="image.jg"/>
<meta property="og:description" content="news portal"/>
But i have the error:
Error 6 Validation (XHTML 1.0 Transitional): Attribute 'property' is not a valid attribute of element 'meta'.
the doctype I have is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
I dont know how can i solve this error cause not recognize this attribute.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您有两个选择:
You have two options:
我的页面根据标准 DOCTYPE 进行验证,并且它们包含给您带来麻烦的 Facebook 元数据。我正在使用更高版本的 XHTML。
然而,我确实必须欺骗验证器忽略“赞”按钮。
大卫
My pages validate against a standard DOCTYPE and they contain the Facebook metadata that's causing you trouble. I'm using a later version of XHTML.
I did, however, have to trick the validator into ignoring the Like button.
David