What is the difference between xml and html

青灯夜游
Release: 2021-05-18 16:58:33
Original
3117 people have browsed it

Difference: 1. The syntax requirements are different. HTML is not case-sensitive, but XML is strictly case-sensitive. 2. The tags are different. HTML uses inherent tags, while xml does not have inherent tags. 3. The functions are different. HTML is used to display data, while xml is used to describe and store data.

What is the difference between xml and html

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

What is HTML

HTML, that is, Hyper Text Markup Language (Hyper Text Markup Language), an application under the standard universal markup language. HTML is not a programming language, but a markup language, which is necessary for web page production. 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.

What is XML

XML is Extensible Markup Language (Extensible Markup Language), which is a meta-language used to define other languages. Its predecessor is SGML (Standard General Markup Language). It has no tagset and no grammatical rules, but it has syntax rules. Any XML document must be well-formed for any type of application and correct parsing, that is, each open tag must have a matching closing tag, must not contain tags in reverse order, and have good statement composition. Should meet the requirements of technical specifications. An XML document can be valid, but it does not necessarily need to be valid. A valid document is a document that conforms to its document type definition (DTD). A document is schema valid if it conforms to the provisions of a schema.

The difference between HTML and XML

1. Different grammatical requirements:

in html Not case sensitive, strict distinction in xml.

In HTML, sometimes loosely, you can omit closing tags such as

or if the context clearly shows where the paragraph or list key ends. In XML, it is a strict tree structure, and the closing tag must not be omitted.

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.

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

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

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

3. Different tags:

html uses inherent tags, and Html tags are predefined; while xml has no inherent tags, and XML tags are customized. Scalable.

3. Different functions:

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

Recommended tutorial: "html video tutorial"

The above is the detailed content of What is the difference between xml and html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!