This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

tagUrn

Property of dom/HTMLElementdom/HTMLElement

Syntax

var result = element.tagUrn;
element.tagUrn = value;

Examples

This example uses the values returned by the scopeName and tagUrn properties to create a simple HelloWorld custom tag.

The browser’s status bar displays the property values.

Note For IE8Standards mode to render correctly, make sure there is no spaces in your call to the HTC file.

<HTML XMLNS:InetSDK='http://msdn.microsoft.com/workshop'>

<STYLE>
@media all {
   InetSDK\:HelloWorld { behavior:url(simple.htc) }
}
</STYLE>
<SCRIPT>
   function window.onload()
   {
      window.status = 'scopeName = ' + hello.scopeName +
                      '; tagUrn = '  + hello.tagUrn;
   }
</SCRIPT>
<BODY>
   <InetSDK:HelloWorld ID='hello'></InetSDK:HelloWorld>

</BODY>
</HTML>

View live example

An alternative call to the HTC can also be made as an attribute, as shown in the following code example.

<HTML XMLNS:InetSDK='http://msdn.microsoft.com/workshop'>

<SCRIPT>
   function window.onload()
   {
      window.status = 'scopeName = ' + hello.scopeName +
                      '; tagUrn = '  + hello.tagUrn;
   }
</SCRIPT>
<BODY>
   <InetSDK:HelloWorld ID='hello' style="behavior:url(simple.htc)"></InetSDK:HelloWorld>

</BODY>
</HTML>

[Note Make sure there are no spaces in your style’s declaration. View live example]

Notes

Remarks

To declare the namespace in the document, use the XMLNS attribute of the html element. Download the HTC for the sample below: simple.htc

Syntax

Attributions