开发者

Meta Tags Property ERROR

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"   con开发者_如何学Ctent="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.


You have two options:

  1. Stop using Facebook's non-standard extensions to HTML
  2. Use a Doctype that references a DTD that includes Facebook's non-standard extensions to HTML (Neither the W3C nor Facebook provide one)


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜