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 the syntactic language 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 those levels or parts. This document can be a random field , such as music, art, literature, or physics. Documents in each domain can be seen as a language (it is generated by XML). "Extensible" is the ability to customize These tags, which the official can not.
HTML, hyper-text markup language. "Hypertext" is very clear that the HTML page can include images, 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 content.
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 very much 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 such a conversion, can choose to support xmldom ASP or Phpserver.
3, operability: They do not operate themselves, XML descriptive data, HTML display.
About their differences :
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, focus on the content of the data.
2, Syntax: integrity, XML requirements All tags are to appear in pairs, HTML is obviously not, for example, IMG, input, etc., can not end tag;
In uppercase and lowercase, HTML does not differentiate between uppercase and lowercase, while XML is strictly differentiated.
3, Autonomy: That is, can be customized enough. XML tags are customized by the schema or document author, and there is no limittoHTML, which can only be defined in advance, that is, head, body, and so on.
Of course, they have their own other functions and characteristics, they do not repeat.
Languages or technologies such as CSS, Javascript, XML, HTML, and Ajax are all for web development, and we can all think of them as a cohesive whole, like a full web page that lacks any part that 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