2012-03-01 128 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> 
相關問題