Home > Web Front-end > HTML Tutorial > 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
Release: 2016-05-16 16:42:59
Original
1813 people have browsed it

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.
Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template