What are the differences between xHTML and HTML tags?

What are the differences between xHTML and HTML tags?
All tags must be lowercase

In XHTML, all tags must be lowercase. You cannot mix uppercase and lowercase letters, nor can you use all uppercase letters. The following is an example.
Error: <Head></Head><Body></Body>
Correct: <head></head><body></body>

Tags must be in pairs

Like <p>...</p>, <a>...</a>, <div>...</div> tags, when a tag appears, there must be a corresponding end tag, both of which are indispensable, just like brackets in any programming language.
Wrong: Hello everyone <p> is the real good thing Correct: <p>Hello everyone</p><p> is the real good thing</p>

Summarize:

The order of tags must be correct. Tags are wrapped from the outside to the inside, layer by layer. So if you write div first and then h1, you should write h1 first and then div at the end. Just remember the principle of "first in, last out", the tag that pops up first should end last.
error: <div><h1>hello</div></h1>
Correct: <div><h1>csdn</h1></div>

All attributes must be enclosed in double quotes.

XHTML 1.0 stipulates that even single quotes cannot be used, so double quotes must be used throughout.
error:<div style=font-size:11px>csdn</div>
Correct: <div style="font-size:11px">csdn</div

target="_blank" is not allowed

Starting from XHTML1.1, the target attribute is completely 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:<a href="http://blog.mukispace.com" target="_blank">csdn</a>
Correct: <a href="http://blog.mukispace.com" rel="external">csdn</a> stick out your tongue

<<:  N ways to vertically center a div with single/multi-line text (unknown height/fixed height)

>>:  The docker-maven-plugin plugin cannot pull the corresponding jar package

Recommend

Summary of ten principles for optimizing basic statements in MySQL

Preface In the application of database, programme...

Implementation of docker view container log command

Why should we read the log? For example, if the c...

Analysis of the HTML writing style and reasons of experienced people

1. Navigation: Unordered List vs. Other Label Ele...

Detailed explanation of the problems and solutions caused by floating elements

1. Problem Multiple floating elements cannot expa...

HTML Table Tag Tutorial (47): Nested Tables

<br />In the page, typesetting is achieved b...

Optimized implementation of count() for large MySQL tables

The following is my judgment based on the data st...

Native js to realize bouncing ball

On a whim, I wrote a case study of a small ball b...

js uses the reduce method to make your code more elegant

Preface In actual projects, the most common proce...