Originally this is prepared for the CSS, but see the video in the CSS and HTML, XML has a relationship, that is, to set their style. and the format of XML and HTML looks a bit similar, you have to analyze the relationship between the two.
To analyze the relationship of things, first understand what they are .
XML, extensible Markup Language. Take a cursory look at the definition: XML is a set of rules that define semantic markup that divides a document into parts and identifies the parts. He is also a meta-markup language that defines syntactic languages used to define other, semantically, structured markup languages that are relevant to a particular domain.
Well, you may have been ignorant. In fact, it means that XML is a rule, that is, to divide a document into different levels or parts, and to mark these levels or parts well . This document can be in any field , such as music, art, literature, or physics. Each area of the document can be seen as a language (it is generated by XML). "Extensible" is that you can define these tags yourself, which the official can not.
HTML, hyper-text markup language. "Hypertext" is obviously the HTML page can contain pictures, links and other non-text elements. HTML is also a standard that uses marker symbols to identify text files (Web pages) and tell the browser how to display the contents.
Next, look at the links between them:
1, from the appearance, the name has an "ML", is the meaning of the markup language, this has to say is a similar point?
Yes, they are similar in name and structurally alike, in fact XML is a complement to HTML.
2, conversion: In order to better adapt to the client browser browsing, can be xml->html on the server side of the conversion, but ordinary static control does not support this conversion, you can choose to support xmldom ASP or PHP server.
3, operability: They do not operate themselves, XML description data, HTML display.
About the difference between them:
1, the purpose: XML is used to describe, transmit and store data, that is, about what is the data and how to store the problem, focus on the appearance of the data;
HTML is used to display data, that is, about how to display and better display the problem, focusing on the content of the data.
2, Syntax: Integrity, XML requires all tags to appear in pairs, HTML is obviously not, such as IMG, input, etc., can have no end tag;
In case of capitalization, HTML is not case sensitive, and XML is strictly differentiated.
3, Autonomy: That is, whether you can define their own. XML tags are defined by the schema or document author themselves, and there is no limitto HTML, which can only be used with predefined, head, body, and so on.
Of course, they also have their own other functions and characteristics, do not repeat each.
Languages or technologies such as CSS, Javascript, XML, HTML, and Ajax are all for web development, and we can all look at them as a cohesive whole, like a full web page, and the missing part doesn't meet the user's requirements. In the learning process can not isolate them, to understand why they are in B/s.
Analysis of the relationship between HTML and XML