What is the difference between XML and HTML?

Frontend 2021-09-05 19:25:54 0 6,616

XML can describe the structure of data well, effectively separate the structure and representation of data, and can be used as a standard format for data exchange. HTML is a language used to write Web pages. HTML binds data and the display appearance of the data. If you only want to use the data without the display appearance, you can imagine how difficult it is to separate the data and the appearance. HTML does not allow users to customize tags. The current HTML has about 100 tags. HTML cannot reflect the structure of the data, it can only describe the display format of the data.

In a sense, XML can provide greater flexibility than HTML, but it cannot replace the HTML language. In fact, XML and HTML work well together. The main difference between XML and HTML is that XML is used to store data. When designing XML, it is used to describe data. The focus is on what data is and how to store data. HTML is designed to display data, and its focus is on how to display the data.


Your opinion

Already have 0 Article answer