Definition and Usage The xmlns attribute specifies the xml namespace for the document. The xmlns attribute is required in XHTML but not in ...
Definition and Usage
The xmlns attribute specifies the xml namespace for the document.The xmlns attribute is required in XHTML but not in HTML.
However, the validator on w3.org does not complain when this attribute is missing from the <html> tag in an XHTML document. This is because "xmlns=http://www.w3.org/1999/xhtml" is a fixed value and will be added to the <html> tag even if you do not include it.
Syntax
<html xmlns="http://www.w3.org/1999/xhtml"> |
Support
W3C: The "W3C" column indicates whether or not the attribute is defined in the W3C HTML/XHTML recommendation.Internet Explorer | Firefox | Opera | Safari | W3C |
---|---|---|---|---|
YES | YES | YES | YES | XHTML only |
Example
<html xmlns="http://www.w3.org/1999/xhtml"> </html> |