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

React-native sample code to implement the shopping cart sliding deletion effect

Basically all e-commerce projects have the functi...

How to use SessionStorage and LocalStorage in Javascript

Table of contents Preface Introduction to Session...

Use of CSS3's focus-within selector

Pseudo-elements and pseudo-classes Speaking of th...

MySQL primary key naming strategy related

Recently, when I was sorting out the details of d...

A complete explanation of MySQL high availability architecture: MHA architecture

Table of contents 1. Introduction 2. Composition ...

Simple Implementation of HTML to Create Personal Resume

Resume Code: XML/HTML CodeCopy content to clipboa...

Vue implements multiple selections in the bottom pop-up window

This article example shares the specific code of ...

What is the length of a function in js?

Table of contents Preface Why How much is it? Num...

Tutorial on installing MySQL 5.7.28 on CentOS 6.2 (mysql notes)

1. Environmental Preparation 1.MySQL installation...

Typora code block color matching and title serial number implementation code

Effect: The title has its own serial number, the ...

Solve the problem of resetting the Mysql root user account password

Problem description: The following error message ...

vue-element-admin global loading waiting

Recent requirements: Global loading, all interfac...

Solution to the garbled code problem in MySQL 5.x

MySQL is a commonly used open source database sof...