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

Three ways to create a gray effect on website images

I’ve always preferred grayscale images because I t...

Detailed explanation of Vue3's responsive principle

Table of contents Review of Vue2 responsive princ...

VMware virtual machine installation Linux system graphic tutorial

This article shares the specific steps of VMware ...

Summary of the use of vue Watch and Computed

Table of contents 01. Listener watch (1) Function...

Javascript scope and closure details

Table of contents 1. Scope 2. Scope Chain 3. Lexi...

js to achieve simple magnifying glass effects

This article example shares the specific code of ...

MySQL 5.6.23 Installation and Configuration Environment Variables Tutorial

This article shares the installation and configur...

Docker large-scale project containerization transformation

Virtualization and containerization are two inevi...

This article will show you the principle of MySQL master-slave synchronization

Table of contents Brief Analysis of MySQL Master-...

How to handle MySQL numeric type overflow

Now, let me ask you a question. What happens when...

Install JDK8 in rpm mode on CentOS7

After CentOS 7 is successfully installed, OpenJDK...

Ansible automated operation and maintenance deployment method for Linux system

Ansible is a new automated operation and maintena...

IDEA complete code to connect to MySQL database and perform query operations

1. Write a Mysql link setting page first package ...