I believe many students are confused about the difference between html and xml, right? Today let us take a look at the difference between html and xml, and what is the difference in syntax between html and xml.
1. What is HTML? .
2. What is XML Language, its predecessor is SGML (Standard General Markup Language). It has no tagset (tagset) and no grammatical rule (grammatical rule), but it has syntax rule (syntax rule). 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.
3. The difference between HTML and XML
Through the above understanding of HTML and XML, let’s take a look at the differences and connections between themxml and html are both used to manipulate data or data structures. They are roughly the same in structure, but there are obvious differences in their essence.
(1) Different grammatical requirements:
1. There is no case sensitivity in html , strictly distinguished 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
or mark. 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, the
attributevalue 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 the XML document, the blank parts will not be automatically
removedby the parser; but html filters out the blanks.
(2) Different tags:1. HTML uses inherent tags; xml does not have inherent tags. 2,
Html tagis predefined; XML tag is free, customizable and extensible.
(3) Different functions:1. HTML is used to display data; xml is used to describe data 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, 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.
2. XML is not a substitute for HTML. XML and HTML are two languages with different uses. XML is not meant 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. Similar to 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.
The above is all the content of this article. I hope it can help everyone and let everyone have a deeper understanding of html and xml
##Related recommendations:
Share a comparison table of html and xml escape characters
The difference between HTML and XML_html/css_WEB-ITnose
The above is the detailed content of The difference between XML and HTML. For more information, please follow other related articles on the PHP Chinese website!

A consistent HTML encoding style is important because it improves the readability, maintainability and efficiency of the code. 1) Use lowercase tags and attributes, 2) Keep consistent indentation, 3) Select and stick to single or double quotes, 4) Avoid mixing different styles in projects, 5) Use automation tools such as Prettier or ESLint to ensure consistency in styles.

Solution to implement multi-project carousel in Bootstrap4 Implementing multi-project carousel in Bootstrap4 is not an easy task. Although Bootstrap...

How to achieve the effect of mouse scrolling event penetration? When we browse the web, we often encounter some special interaction designs. For example, on deepseek official website, �...

The default playback control style of HTML video cannot be modified directly through CSS. 1. Create custom controls using JavaScript. 2. Beautify these controls through CSS. 3. Consider compatibility, user experience and performance, using libraries such as Video.js or Plyr can simplify the process.

Potential problems with using native select on mobile phones When developing mobile applications, we often encounter the need for selecting boxes. Normally, developers...

What are the disadvantages of using native select on your phone? When developing applications on mobile devices, it is very important to choose the right UI components. Many developers...

Use Three.js and Octree to optimize collision handling of third-person roaming in the room. Use Octree in Three.js to implement third-person roaming in the room and add collisions...

Issues with native select on mobile phones When developing applications on mobile devices, we often encounter scenarios where users need to make choices. Although native sel...


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
