有效的xhtml元标签用于Facebook开放图表和微博卡 [英] valid xhtml meta tags for facebook open-graph and twitter cards

查看:136
本文介绍了有效的xhtml元标签用于Facebook开放图表和微博卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

生效:


  • xhtml

  • twitter卡

  • facebook-graph-api

for http://www.theyact.com/acting-classes/los-angeles/

我设法让我的代码到处都有效... _

上保存1个错误 http://validator.w3.org/

I've managed to get my code to come up valid everywhere...
save 1 error on http://validator.w3.org/


没有属性属性

there is no attribute "property"

但代码中的许多人中只有1个例子,只有下面的样子才能使验证器的羽毛变得松动:

but only 1 instance among the many in the code, only the below seems to ruffle the validator's feathers:

< meta name =og:descriptionproperty =og:descriptioncontent =...

<meta name="og:description" property="og:description" content="...

我喜欢在validator.w3.org的眼中完全有效的代码,我缺少什么?

I'd like the code to be completely valid in validator.w3.org's eyes. What am I missing?

推荐答案

元素,验证者将抱怨ab出来下一个包含属性属性。

If you remove this element, the validator will complain about the next one containing the property attribute.

属性属性是RDFa的一部分,但您的DOCTYPE不允许使用RDFa。

The property attribute is part of RDFa, but your DOCTYPE doesn’t allow the use of RDFa.

如果要继续使用XHTML 1.1,可以将其更改为:

If you want to keep using XHTML 1.1, you could change it to:


  • for RDFa 1.0 <!DOCTYPE html PUBLIC - // W3C // DTD XHTML + RDFa 1.0 // ENhttp ://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd>

<!DOCTYPE html PUBLIC - // W3C // DTD XHTML + RDFa 1.1 // ENhttp://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd < / code>

for RDFa 1.1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">

或者只需切换到(X)HTML5,附带RDFa 1.1支持

这篇关于有效的xhtml元标签用于Facebook开放图表和微博卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆