Could anybody tell me what is the main differences betwwen XML and HTML? Thank you.
HTML came first. Technically, it's a 'language' or 'vocabulary' of
SGML. Technically. SGML was developed from GML. Etc. XML is more of a
simpler, more restrictive, subset of SGML, making it easier for
manufacturers to implement.
In short, though, the next version or standard of HTML, is called,
XHTML. It is the tag and attributes of HTML, but conforming to a few
XML 'style' preferences. Once, however, you have HTML as a version, or
'vocabulary' of XML, then all the general features of XML become
available (such as the 'magic' that is - namespaces). And the same
parsers written by manufacturers for XML, can be used on XHTML web
pages - XHTML, like XSLT, are then written in . . XML.
One of the first things one notices is that relaxed defaults are not
allowed in XML, and so therefore in XHTML. All attributes must be
enclosed in double quotes. All tags must have a closing tag, even
those which didn't before (like br, img, or hr), or which didn't
require one, necessarily, in HTML 4 (such as p, paragraph, I believe).
A shorthand is allowed for a closing tag by placing a backslash just
before the closing 'greater than' bracket of a tag - for ex., not
<br>, but <br />. Empty attributes, such as the "noshade" attribute of
a horizontal line - hr - might be written as - noshade="noshade". And
so on.