×
HTML标签列表(字母排序)HTML标签列表(功能排序)HTML 全局属性HTML 事件属性HTML 画布HTML 音频/视频HTML 有效 DOCTYPESHTML 颜色名HTML 拾色器HTML 颜色混搭HTML 字符集HTML ASCIIHTML ISO-8859-1HTML 符号实体HTML URL 编码HTML 语言代码HTML 状态消息HTML GET/ POST方法Px、Em 换算工具键盘快捷键

HTML 标签

<!--...--><!DOCTYPE><a><abbr><acronym><address><applet><area><article><aside><audio><b><base><basefont><bdi><bdo><big><blockquote><body><br><button><canvas><caption><center><cite><code><col><colgroup><command><datalist><dd><del><details><dfn><dialog><dir><div><dl><dt><em><embed><fieldset><figcaption><figure><font><footer><form><frame><frameset><head><header><hgroup><h1><hr><i><iframe><img><input><ins><kbd><keygen><label><legend><li><link><map><mark><menu><meta><meter><nav><noframes><noscript><object><ol><optgroup><option><output><p><param><pre><html><progress><q><rp><rt><ruby><s><samp><script><section><select><small><source><span><strike><strong><style><sub><summary><sup><table><tbody><td><textarea><tfoot><th><thead><time><title><tr><track><tt><u><ul><var><video><wbr>

HTML <html> xmlns 属性


HTML <html> 标签HTML <html> 标签


实例

一个简单的 XHTML 文档,带有最少的必需标签:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<title>文档标题</title>
</head>

<body>
文档内容......
</body>

</html>

尝试一下 »

浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主流浏览器都支持 xmlns 属性。


定义和用法

注意:在 XHTML 中,xmlns 属性是必需的。在 HTML 中,xmlns 属性是无效的。

xmlns 属性规定文档的 xml 命名空间。

然而,如果在 XHTML 文档中未使用 xmlns, http://w3.org 的 HTML 验证器也能正确识别文档。这是因为命名空间 "xmlns=http://www.w3.org/1999/xhtml" 是默认的,会自动添加到 <html> 标签。


语法

<html xmlns="http://www.w3.org/1999/xhtml">

属性值

描述
http://www.w3.org/1999/xhtml 要使用的命名空间(XHTML 文档)。

HTML <html> 标签HTML <html> 标签


分类导航

关注微信下载离线手册

bootwiki移动版 bootwiki
(群号:472910771)