What are the differences between xHTML and HTML tags_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:37:33
Original
1443 people have browsed it

All tags must be lowercase

In XHTML, all tags must be lowercase. The tongue cannot be interspersed with uppercase and lowercase, nor can it be all uppercase. Examples are as follows.
Incorrect:


Correct:

Tags must be in pairs

Such as

...

, ...,
...
tags, etc. When a tag appears, there must be a corresponding end tag. They are indispensable, just like parentheses in any programming language.
Wrong: Hello everyone

is really good
Correct:

Hello everyone

is really good



Summary:

The order of tags must be correct. Tags are covered layer by layer from outside to inside, so assuming you write div first and then h1, at the end you should write h1 first and then div. Just remember the principle of "first in, last out", the label that pops up first should end last.
error:

hello


Correct:

csdn



All attributes must use double quotes

In XHTML 1.0, it is stipulated that even single quotes cannot be used, so double quotes must be used throughout.
error:
csdn

Correct:
csdn


target="_blank" is not allowed

Comprehensive as of XHTML1.1 The target attribute is prohibited. If you want to have the function of opening a new window, you must rewrite it as rel="external" and use JavaScript to achieve this effect.
error: csdn
Correct: csdn stick out tongue
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template