Home>Article>Web Front-end> What types of files are xml and html respectively?

What types of files are xml and html respectively?

醉折花枝作酒筹
醉折花枝作酒筹 Original
2021-06-04 14:43:00 2785browse

XML is an extensible markup language, a markup language used to mark electronic documents to make them structural. It can be used to mark data and define data types; html is a hypertext markup language, a standard universal markup language. It is not a programming language, but a markup language, which is necessary for web page production.

What types of files are xml and html respectively?

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

xml is an extensible markup language, and html is a hypertext markup language; the tag names in xml can be randomly chosen, and the attribute names can also be randomly chosen; but the tag names in html are prescribed, and the format is also prescribed. OK;

Extensible Markup Language (XML) provides a way to describe structured data. Unlike HTML tags, which are used primarily to control the display and appearance of data, XML tags are used to define the structure and data type of the data itself.

XML uses a set of tags to describe data elements. Each element encapsulates data that may be very simple or very complex. You can define an unlimited set of XML tags. For example, you can define some XML tags to declare data in the order, such as price, tax, shipping address, billing address, and so on. Because XML markup is adopted throughout and across organizations, data from a variety of different data stores will be easier to exchange and manipulate.

XML is a simple, platform-independent and widely adopted standard. The advantage of XML over HTML is that it separates the user interface from structured data. This separation of data and display makes it possible to integrate data from different sources. Customer information, orders, research results, bill payments, medical records, directory data and other information can be converted to XML.

HTML stands for Hypertext Markup Language and is a markup language. It includes a series of tags. These tags can unify the document format on the network and connect scattered Internet resources into a logical whole. HTML text is descriptive text composed of HTML commands. HTML commands can describe text, graphics, animations, sounds, tables, links, etc.

Hypertext is a way of organizing information that associates words and graphics in the text with other information media through hyperlinks. These interrelated information media may be in the same text, may be other files, or may be files on a computer that are geographically distant. This way of organizing information connects information resources distributed in different locations in a random manner, making it easier for people to find and retrieve information.

Extended information:

xml and html are both used to manipulate data or data structures. They are roughly the same in structure, but they exist in essence. obvious difference. A summary of various information available online is as follows.

(1) Different grammatical requirements:

1. Case-insensitive in html, but strictly in xml.

2. In HTML, sometimes it is not strict. If the context clearly shows where the paragraph or list key ends, then you can omit the ending like

ormark. In XML, it is a strict tree structure, and the closing tag must not be omitted.

3. In XML, elements that have a single tag without a matching closing tag must end with a / character. This way the parser knows not to look for the closing tag.

4. In XML, attribute values must be enclosed in quotation marks. In HTML, quotation marks are optional.

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

6. In XML documents, the blank parts will not be automatically deleted by the parser; but html filters out the blanks.

(2) Different tags:

1. HTML uses inherent tags; xml does not have inherent tags.

2. Html tags are predefined; XML tags are free, customizable and extensible.

(3) Different functions:

1. HTML is used to display data; xml is used to describe and store data, so it can be used as a persistence medium! Html combines data and display and displays the data on the page; xml separates data and display. XML is designed to describe data, with the focus being the content of the data. HTML was designed to display data, with the focus being on the appearance of the data.

2. XML is not a substitute for HTML. XML and HTML are two languages with different uses. XML is not intended to replace HTML; in fact, XML can be seen as a complement to HTML. The goals of XML and HTML are different. The design goal of HTML is to display data and focus on the appearance of the data, while the design goal of XML is to describe the data and focus on the content of the data.

3. XML without any behavior. Like HTML, XML does nothing. (Common ground)

4. The best description of XML may be: XML is a cross-platform, software- and hardware-independent tool for processing and transmitting information.

5. XML will be everywhere in the future. XML will become the most common tool for data processing and data transmission.

Recommended learning:html video tutorial

The above is the detailed content of What types of files are xml and html respectively?. For more information, please follow other related articles on the PHP Chinese website!

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