Whats the difference between SGML, HTML, and XML?
HTML looks like SGML, but HTML tags are mostly style descriptors rather than structure descriptors. Example: the HTML “” tag says: make the following text appear in bold-face. The HTML “
” element, on the other hand, is an example of a structure-describing tag: it doesn’t prescribe what the text it contains is supposed to look like, but rather it articulates what that content means. XML is a simplified, “dumbed-down” variant of SGML. XML tags should generally be structure-describing, but SGML is functionally much richer than XML. Also, XML does not require an explicit document type (document structure) specification (DTD). This makes XML easier to code, but it also provides less motivation and assistance to think about the structure of one’s document, since, in an XML document instance, you can make up new (or inconsistent) elements as you go along, e.g., calling a quotation here a: ““, there a: ““, elsewhere a: “ “, etc.