. 添加xmlns ,朗和XML :郎属性您<html>元素 。
请记住, XML的可用于确定许多标记语言以外的XHTML 。 language you're talking about when you use the element <html> (after all, someone could come along and make up their own language with XML and call it the "Hippo Tipping Markup Language," which would cause mass confusion).为了使所有这些语言直,需要知道XML的语言你在谈论当您使用的元素<html> (毕竟,有人可能会出现,弥补自己的语言与XML和调用它的“河马小费标记语言, “这将导致大规模的混乱) 。 attribute specifies which language the <html> element belongs to.因此,要保持连续, xmlns属性指定的语言 的 <html>元属于。 element?和所有的其他要素内部的 <html>因素? attribute of their parent.默认情况下,他们继承了xmlns属性,其母公司。
element also needs lang and xml:lang attributes, which specify the language being used in the XML document. 的 <html>内容也需要郎和 XML :郎属性,它指定的语言中所用的XML文档。 opening tag should look like in XHTML:以下是您的<html>开始标记看起来应该像这样在XHTML :
The xmlns attribute is “的HTML xmlns 的xmlns属性
用于识别的XML语言“的HTML ”属于。
XML uses a URL as a unique = “ http://www.w3.org/1999/xhtml ” XML使用一个URL作为一个独特的
标识符的语言。 如果有人写了“河马小费标记语言” ,他们
可能会使用“ http://www.hippotipping.com/html ”作为其标识。 不要紧
什么是在单独的URL网址是足以令它独一无二的。
And we just need to specify that 郎= “恩”的XML :郎= “恩” “ 我们只需要指定
我们使用的是英语。 根据不同的方式解释您的XHTML的浏览器,你
可能需要的任何一个这些,因此,最好的做法是同时使用。