How Does XML Relate to HTML?

XML is a meta language, a set of syntax rules. HTML is an application language, a predefined vocabulary that uses the rules of another meta language, Standard Generalized Markup Language (SGML).

Both XML and HTML derive from SGML, but in different ways. XML uses a subset of the syntax rules allowed in SGML documents. In principle, HTML can use all the syntax rules of SGML, but only as a defined vocabulary that makes use of the SGML syntax rules.

HTML has a defined number of tags defined by specification documents produced by W3C. An HTML processor—a Web browser—should process only those tags that are officially approved. With the exception of some legacy or unofficial tags, such as the embed tag, this is what an ...

Get Sams Teach Yourself XML in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.