Ok, so I'm not quite sure the difference between these languages. Could someone clarify? I know that XML has user-defined tag and html is pre-defined, but thats basically the extent of my knowledge.
I know that HTML5 is supposed to replace HTML, but wasn't XML supposed to do that as well? Basically, which languages here are a substitute for the other, and which complement? Does XML replace XHTML?
See for the graphic for the two serializations of HTML5 Abstract language.
HTML is a markup language for web pages, while XML is a markup language for information. XML was never meant as a direct replacement for HTML, it has a different scope.
HTML 5 is just the latest version of HTML. The "current" version of HTML (the one supported by practically all browsers in use) is 4.01.
XHTML is a standard based on HTML that has been adjusted to conform to the stricter rules of XML. An XHTML document is also an XML document and if it's correctly written it can be parsed by any XML parser.
HTML is a markup language made for Web pages. HTML 5 is the fifth version of HTML.
XML is another markup language. XHTML is a dialect of XML that closely resembles HTML and was meant to replace it, but due to poor support has basically just existed alongside HTML.