HTML html xmlns attribute
Examples
A simple XHTML document, with a minimum of required tags:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<title>文档标题</title>
</head>
<body>
文档内容......
</body>
</html>
<head>
<meta charset="utf-8">
<title>文档标题</title>
</head>
<body>
文档内容......
</body>
</html>
try it"
Browser Support
All major browsers support xmlns attribute.
Definition and Usage
Note: In XHTML, xmlns attribute is required.In HTML, xmlns attribute it is invalid.
xmlns attribute specifies the xml document namespace.
However, if you do not use the xmlns in XHTML documents, http://w3.org the HTML validator can correctly recognize the document. This is because the namespace "xmlns = http: //www.w3.org/1999/xhtml" is the default, it will be automatically added to the <html> tag.
grammar
<html xmlns="http://www.w3.org/1999/xhtml">
Property Value
值 | 描述 |
---|---|
http://www.w3.org/1999/xhtml | 要使用的命名空间(XHTML 文档)。 |
HTML <html> tag