2012-03-01 129 views
1

我在我的html 4.01严格DOCTYPE中使用了facebook和twitter插件,这给我下面的错误。如何使用html 4.01验证facebook和twitter插件严格的文档类型

Error Line 166, Column 23: there is no attribute "HREF" 
Line 166, Column 107: there is no attribute "SHOW_FACES" 

请帮助我,我如何从我的HTML页面中删除了这些验证错误的。 我用下面的文档类型和代码

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 

Facebook的代码

<fb:like-box href="http://www.facebook.com/pages/mysite/45662125588" width="692" show_faces="true" stream="true" header="true"></fb:like-box> 

请帮助我,如果你有任何建议

回答

0

试试这个:

<html xmlns="http://www.w3.org/1999/xhtml" 
     xmlns:og="http://ogp.me/ns#" 
     xmlns:fb="http://www.facebook.com/2008/fbml" 
     xmlns:google="http://base.google.com/ns/1.0" 
     xmlns:twitter="http://api.twitter.com/"> 

然后如果没有按没有用,把DOC的类型改成这样的

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

目前,似乎对验证+ Facebook的插件来工作的唯一方式是使用 HTML5的doctype

<!doctype html> 
相关问题