Well, to start, the "ML" in all of these languages stands for markup language. A markup language is essentially bits of text, separate from the text content, that describes how a document should be arranged or styled.
In the case of SGML, think of it as the grand daddy of HTML, XML, XHTML. It's name "Standard Generalized Markup Language" describes that it is intended for a variety of uses. However, with the dawn of the web, the needs for dynamic content have led to successive releases and updates of "Hyper Text Markup Language" or HTML. HTML is intended with web pages in mind.
Although XML (eXtensible Markup Language) was originally intended for using in web applications, it has branched into many other fields. Many programming frameworks and applications use XML documents to share data structures. Because XML is considered to be well formed, and can be read by humans and machines alike, it allows greater freedom when sharing things more abstract that documents intended for human presentation.
XHTML (eXtensible Hyper Text Markup Language) is intended using many of the features of XML, and use the features of HTML. In many cases this simply means that XHTML is more strict about how documents are formed over HTML. In theory, it should lead to few compatibility issues and generally better markup for all content. However, the adoption of XHTML standards has been slow, and it doesn't seem to be increasing.
Long story short, SGML started the ball rolling for HTML, XML took a similar route but ended up being used differently, and XHTML attempted to bridge the gap between the two.
Well, to start, the "ML" in all of these languages stands for markup language. A markup language is essentially bits of text, separate from the text content, that describes how a document should be arranged or styled.
In the case of SGML, think of it as the grand daddy of HTML, XML, XHTML. It's name "Standard Generalized Markup Language" describes that it is intended for a variety of uses. However, with the dawn of the web, the needs for dynamic content have led to successive releases and updates of "Hyper Text Markup Language" or HTML. HTML is intended with web pages in mind.
Although XML (eXtensible Markup Language) was originally intended for using in web applications, it has branched into many other fields. Many programming frameworks and applications use XML documents to share data structures. Because XML is considered to be well formed, and can be read by humans and machines alike, it allows greater freedom when sharing things more abstract that documents intended for human presentation.
XHTML (eXtensible Hyper Text Markup Language) is intended using many of the features of XML, and use the features of HTML. In many cases this simply means that XHTML is more strict about how documents are formed over HTML. In theory, it should lead to few compatibility issues and generally better markup for all content. However, the adoption of XHTML standards has been slow, and it doesn't seem to be increasing.
Long story short, SGML started the ball rolling for HTML, XML took a similar route but ended up being used differently, and XHTML attempted to bridge the gap between the two.