xmlns attribute (html)
Declares a namespace for custom tags.
The xmlns attribute is useful if you want to create custom elements with namespace in a HTML document.
Declare a namespace first and import element behaviors into it with the ?IMPORT processing instruction in HTML or with the doImport method in JavaScript.
For a detailed description, please see the pages for the ?IMPORT PI and the doImport method.
Possible values:
String that sets the prefix and the Uniform Resource Name (URN) of the namespace.
The syntax of this value is based on the Namespaces in XML 1.0 (W3C) specification.
Default: this attribute has no default value.
Example HTML code 1:
This example illustrates the use of the xmlns attribute:
|
|||||
<html xmlns:myNS="http://help.dottoro.com/NS"> <head> <script type="text/javascript"> var namespace = document.namespaces("myNS"); namespace.doImport("hover.htc"); </script> </head> <body> <myNS:span>Move the mouse over this text (element with behavior)</myNS:span><br /> <span>Move the mouse over this text (element without behavior)</span> </body> </html> |
|||||
|
|||||
Did you find this example helpful?
|
Supported by tags:
External links:
User Contributed Comments