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:
- Stop using Facebook's non-standard extensions to HTML
- 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
精彩评论