Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML html xmlns attribute

HTML xmlns attribute

HTML html Tag Reference HTML Tag

Example

A simple XHTML document with the minimum required tags:

Document title

Document content......

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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 html Tag Reference HTML tag