Home >Web Front-end >HTML Tutorial >The difference between html xhtml xml
For beginners of HTML, I believe they will be confused by html, xhtml, and xml, but I believe that as your knowledge and technology become more and more in-depth, you will slowly become clear about them. The editor has compiled some concepts of html, xhtml, and xml to help you understand these concepts. Without further ado, read on
html
, etc.
xhtml
xhtml is used to replace html. It is a web specification and standard. When we write tags during the development process, we should write them in accordance with xhtml. Develop good label writing habits.
The main difference between xhtml and html is the xhtml requirement:
For correct nesting, all elements must turn off case sensitivity. We commonly use lowercase element attribute values with double quotes, and cannot be replaced by id. name attribute
xml
The difference between html, xhtml and xml:
1. Compared with html, xhtml documents have good and complete layout, which is reflected in two aspects: a. Elements must have end tags; b. , elements must be nested;
2. For html elements and attributes, xhtml must be lowercase, because xml is strictly case-sensitive,3. The attribute value of xhtml must be in quotation marks; 4. xhtml does not support attribute minimization. What is attribute minimization?
Correct: unminimized attributes
Incorrect: minimized attributes < input checked>
5. In xhtml, the name attribute is deprecated and will be deleted in future versions.
It is said that the early webpage is written in HTML language, but it has three serious shortcomings:
1. The coding is not standardized, the structure is confusing and bloated, and it requires an intelligent terminal to display it well. ;
2. The performance and structure are confusing, which is not conducive to development and maintenance;
3. More network devices cannot be used, such as mobile phones, PDAs, etc.;
Therefore HTML Development is needed to solve this problem, so W3C formulated XHTML. XHTML is a bridge from HTML to XML. And xml is the trend of web development.