= = = Define tags and namespaces = =
HTC is based on custom tags, and the first appearance of custom tags is in IE5. 0, it allows Web authors to define a document structure by a series of styles associated with a struct, such as: You can define a new tag <RIGHT> (paragraph right)
<HEAD>
<STYLE>
@media All {
docjs\:right {text-align:right; width:100}
}
</STYLE>
</HEAD>
<BODY>
<DOCjs:RIGHT>
Read Doc JavaScript ' s columns, tips, tools, and tutorials
</DOCjs:RIGHT>
</BODY>
</HTML>
In Internet Explorer you want to define a custom tag for a page, you must provide the namespace for the tag, and the custom tag is an XML namespace based on XML symbols, as shown below. We use the Docjs namespace:
XMLNS is an acronym for XML namespace, and I define a custom tag called right, which must precede the tag with the correct XML namespace prefix: Docjs:right, if the namespace is undefined, when the document is parsed, Custom tags will be handled as unknown tags although the page has an unknown tag, but does not cause an error, does not affect other tags, and no behavior can be applied to it, you can define multiple namespaces in a single HTML tag: