Comparison Between XML and HTML

Source: Internet
Author: User

HTML (HypertextMarkupLanguage) is known as hypertext, because it has a hyperlink function that is not available in common text. It is a markup language designed for "web page creation and other information that can be seen in Web browsers" for structured information, such as titles, paragraphs, and lists, it can also be used to describe the appearance and semantics of a document to a certain extent.

XML is an eXtensible Markup Language (eXtensible Markup Language). It is cross-platform in the Internet environment and relies on content technology. It is a powerful tool for processing structured document information. The Extended Markup Language XML is a simple data storage language that uses a series of simple markup to describe data.

XML and HTML are both Markup languages applied to the WEB Front-end ,. However, HTML has fixed tags used to combine data and display, and display the data on the page. The data looks like the data in the focus, but XML does not have a fixed tag, to describe the data or data structure of the page content. The focus is on the data content, realizing the separation of content and display. XML is a supplement to HTML, which improves the flexibility of the system. Therefore, HTML is the foundation of a website, and XML will become an important role in website development, maybe it will trigger the burden of processing and transmitting all data.

The following is a comparison between my HTML and XML Syntax:

1. HTML is case-insensitive and XML is case-insensitive;

2. HTML has fixed tags, while XML does not. tags can be defined and nested information structures are allowed;

3. If the HTML context clearly shows the end of a paragraph or list key, you can omit the ending mark or the like. In XML, the end tag cannot be omitted. An element that does not match a single tag must end with one character;

4. quotation marks are usable in HTML. In XML, attribute values must be placed in quotation marks;

5. In HTML, You can have attribute names without values. In XML, all attributes must have corresponding values.

Comparison of HTMl and XML in other aspects:


In short, XML is neither an HTML upgrade nor an HTML replacement product. Although the two are similar, their application fields and scopes are completely different.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.