XML shares common origins with HTML and SGML. SGML or "Standard Generalized Markup Language" was issued as an international standard (ISO 8879) in 1986. It was intended for semantic markup that would assist computer cataloging and indexing. SGML provided flexibility that had not been available before and became very popular and was applied in many ways beyond the intentions of the original developers. It was, however, very complex and expensive.
About 1990, Tim Berners-Lee at CERN developed a new, simpler language that could be used in place of SGML. Thus was born HTML or "Hyper Text Markup Language." It was intended to be a simpler language that did not require expensive authoring tools. HTML succeeded beyond anyone's expectations but it lacked a certain flexibility that developers wanted. Various groups made changes and added extensions until HTML's roots had been mangled.
In the summer of 1996, a working group at W3C was formed to create a markup language that would combine the strength of SGML with the simplicity of HTML. The first official draft specification for XML was released in November 1996. XML version 1.0 became a W3C recommendation in 1998.
XML appeared just as the growth of the Web has increased the number of developers who demand the ease and flexibility that it provides.
Presentation, Communication and Storage of Data
The basic structure of XML is the document. This terminology, however, might cause one to think of XML as only a richer, more flexible HTML. It is richer and more flexible, but it can be so much more as well.
Thinking of XML as a document allows you to see how it can be used for presentation of data. This presentation can be detailed and useful. Most browsers now handle XML for presentation.
XML does, however, actually go beyond documents. It can be used for the communication of data as well. XML uses a flexible tagged structure that makes it more robust than a fixed record format for communication. See Web Services.
Finally, XML can also be used to define the storage of data. The same flexible tagged structure can be used when storing data. See XML databases.
More on the general topic: XML Standards and Semantic Vocabularies