English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML html xmlns Attribut

Die xmlns-Attribut spezifiziert den XML-Namensraum des Dokuments, wenn das xmlns-Attribut im XHTML-Dokument fehlt, befindet sich der http://w3Die HTML-Validierung von .org gibt keine Warnungen aus. Dies liegt daran, dass der Namensraum " xmlns = http://www.w3.org/1999/xhtml" ist der Standardname, auch wenn Sie ihn nicht enthalten, wird er automatisch zum <html>-Tag hinzugefügt.

 HTML <html> Tag

Online-Beispiel

Ein einfaches XHTML-Dokument mit den wenigsten erforderlichen Tags:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"> 
">/<title>文档标题<
body>/title>
head>
<body>
body>/文档内容......
body>/<
html>/Test and see ‹

Browser CompatibilityIEFirefoxOperaChrome

Safari

All mainstream browsers support the xmlns attribute.

Definition and Usage
xmlns attribute specifies the XML namespace of the document. 4Note: The xmlns attribute is required in XHTML, in HTML1.05is invalid, in HTML
Note: When the xmlns attribute is missing in an XHTML document, the following is optional. http://w3.orgThe HTML validation program will not issue a reminder. This is because the namespace “ xmlns = http://www.w3.org/1999/xhtml” is the default namespace, even if you do not include it, it will be added to the <html> tag.

Syntax

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

Attribute Value

ValueDescription
http://www.w3.org/1999/xhtmlThe namespace to be used (for XHTML documents).
 HTML <html> Tag