Difference between the language of html and xml

@aisoice (272)
Indonesia
February 23, 2011 1:46am CST
There are a couple of friends ask to me, but I find difficult to answer with a language that is easy to understand. Maybe friend can help me to explain it in simple terms. What is the most fundamental difference between the language of html and xml ? And how to know a language program using html or xml ? Thank you for your explanation.
3 responses
@saphrina (31551)
• South Africa
23 Feb 11
Hi sweetie. Here is the difference. XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks. Hope that helps. TATA.
@aisoice (272)
• Indonesia
23 Feb 11
hi saphrina, Thank you for your explanation. Can you give me a sample ? And how to know a language program using html or xml ? thanks
@saphrina (31551)
• South Africa
23 Feb 11
Hi sweetie. XML files are meant to hold data and data in an xml file is well described. If you look at an xml file you can say what it holds. For example if you find a number in an xml file you can find out easily what that number identifies, whether it is the number of products, or the price of a product etc. In html it is not the case. HTML is used to display the data in a formatted way. You can apply styles and use different layouts to display the data in an html file. The data that is displayed in an html file could come from an xml file. Better. Html is more to use pics if i can put it that way. Like a website or blog. xml is more the data, the words per se.
1 person likes this
• Pamplona, Spain
23 Feb 11
Hiya asoice & saphrina, Great explanation for someone like me that thought html was another language and xml well sounds like something from outer space. I could not have put it into words like that myself without going all around the Mulberry Bush and back again. I am not a techie and this kind of stuff makes my mind boggle sometimes. I did however manage to put two websites together learning all by my little self (grin). Not a bad effort I thought to myself to. Anyway good for People like me that would have a hard time trying to explain it to others. Great stuff this.
@rameshchow (4426)
• India
23 Feb 11
You learn from wikipedia links: http://en.wikipedia.org/wiki/XML http://en.wikipedia.org/wiki/Html xml is the advancement of html. xml is consists of machine readable instructions. html having hyper texts mainly uses braces.....
• India
25 Feb 11
I know that "you r a genius".
@aisoice (272)
• Indonesia
24 Feb 11
hi rameschow, Thank you for the link and your explanation. No I've understood.
@RamRes (1723)
• Argentina
25 Feb 11
I would like before all to demystify them both. They are NOT programming languages at all, there are no instructions and there is no execution at all of any code within them. They both ARE formats to describe DATA. HTML is the standard specification to describe web pages. Their primary function is to provide web browsers with a common way to read and know how to display sites the user want. Among the things HTML covers is the text, images, links, styles and general formating that the browser should display. It works with a predefined (by the specification) set of TAGs that describe each style and special behavior and formatting that the page should have. The key point to HTML is that it has a clear purpose and objective, it solely exists to format web pages. XML is a general purpose language specification whose goal is to describe DATA of any kind in a standard basic format consisting of only plain text characters. It uses tags too, quite similar to what HTML uses, but the great difference is that there is no standard way describing which tags exists. The XML specification only describes what is a tag, the proper formatting and structures of them and their attributes and what constitutes a well-formed XML document. The specifics of what tags are valid and how the data the XML contains is described is responsibility of each application, and each one is free to use whatever tags, attributes, and structures feels convenient as long as it complies with the standard. Looking at both documents (HTML and XML) you'll realize that they're quite similar. In fact, XML is an extension of what HTML does, more generalized to cover many situations. Also you may think about HTML as a particular use case of XML, as the HTML document, when properly wrote, is in fact an well-formed XML document too. But XML goes beyond that, and may be applicable in nearly all situations where programs need to share or store data in a normalized, human readable format.
@aisoice (272)
• Indonesia
28 Feb 11
Hi RamRes, Thank you very much for your explanation. Now I understood.