,

and other tags"/> ,

and other tags">

Home  >  Article  >  Web Front-end  >  Implementation method of using html custom tags_HTML/Xhtml_Web page production

Implementation method of using html custom tags_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:42:591787browse

You can freely use custom tags in xml files, and you can also use custom tags in html files, but there are a few things to note:
The xmlns attribute of the tag must be set. For example, it can be declared like this: .
This is because the html file has a default "namespace", and tags such as

,

are in this default "namespace".
Obviously, this default " "Namespace" does not contain our "custom label", so we can only define a "namespace" ourselves and let the "custom label" be in this custom "namespace".
Pass me In this attempt, the custom namespace cannot be used in Chinese. For example, it is wrong to declare:
When using custom tags, you should use the form and cannot write In other words, the "namespace" in which it is located must be specified before the name of the custom tag.
The style of the custom tag can be set in the


Note that when setting the style in the



Here is the title of the article

Here is the text of the article



Comment: Custom tag The display value defaults to inline. In this example, it is changed to block display.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:16 Guidelines for XHTML1.0 and HTML Compatibility Summary_HTML/Xhtml_Web Page ProductionNext article:16 Guidelines for XHTML1.0 and HTML Compatibility Summary_HTML/Xhtml_Web Page Production

Related articles

See more