2012-02-01 18 views
1

通常我的頁面被定義爲:我可以添加更多的xmlns屬性?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it"> 

但使用Facebook的插件,它說:

Add an XML namespace to the <html> tag of your document. This is necessary for XFBML to work in earlier versions of Internet Explorer. 

<html xmlns:fb="http://ogp.me/ns/fb#"> 

所以我寫了:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#" xml:lang="it"> 

這是正確的嗎?或HTML文檔只需要1周的xmlns?

回答

3

只要你不指定DTD XHTML格式嚴格,多重的xmlns屬性是允許的。所以沒關係。