Home  >  Article  >  Web Front-end  >  The difference between html xhtml xml

The difference between html xhtml xml

怪我咯
怪我咯Original
2017-01-16 16:55:342686browse

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

html: Hypertext markup language, this is easy to understand, that is to say, the web pages we see are actually described through a hypertext markup language, which is html. Hypertext, beyond text, we have also seen, including pictures, videos, audios, programs

, etc.

xhtml

xhtml: Extensible Hypertext Markup Language, almost the same as html4.01. It is more rigorous and pure html, but xhtml is not html4.01. Check for yourself where the rigor is, where the purity is, and where the scalability is. This article aims to rectify the situation.

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

xml: Extensible Markup Language, designed to transmit data, is not predefined and needs to be defined by yourself. For example, you know that the < h1 > tag in html is the title, but there is no definition of which tag has what semantics in xml. What needs to be understood here is that xml does not replace html. Their design purposes are different.

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,
  • and
  • are different tags ;

    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.

  • Statement:
    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
    Previous article:How to learn HTML quicklyNext article:How to learn HTML quickly