HTML xmlns attribute
Example
A simple XHTML document with the minimum required tags:
Document content......
Try it »
Browser support





All major browsers support the xmlns attribute.
Definition and Usage
**Note:** In XHTML, the xmlns attribute is required. In HTML, the xmlns attribute is invalid.
The xmlns attribute specifies the xml namespace of the document.
However, if xmlns is not used in an XHTML document,http://w3.org the HTML validator will still recognize the document correctly. This is because the namespace "xmlns=http://www.w3.org/1999/xhtml" is the default and is automatically added to the tag.
Syntax
Attribute values
| Value | Description |
|---|---|
| http://www.w3.org/1999/xhtml | The namespace to use (XHTML documents). |
HTML tag