The eXtensible HyperText Markup Language (XHTML) and the eXtensible Markup Language (XML) are two types of markup languages that use tags to mark and describe data in a structured format. XML is primarily made up of rules that govern tag syntax and is often used as a template for other markup languages. XHTML is a combination of the syntax rules from XML and the tags of the earlier HyperText Markup Language (HTML) used to create web documents. Both XHTML and XML are used on the web, but the former is mostly confined to webpages while XML and languages based upon have a wider variety of purposes, including in databases, web feeds, and podcasting.
Markup languages such as XHTML and XML create structured documents, or documents that include base content and some additional information that describes the role or purpose of the base content. The concept is similar to a college professor conveying information to students through copy editing symbols; documents are “marked up” with structural information that identifies the function of certain pieces of content. Most modern markup languages use tags enclosed within angled brackets.
XML is a special type of markup language called a metalanguage that can serve as a template for other languages. Instead of creating a list of predefined tags and attaching meaning to them, the creators of this unique master language focused only on establishing syntax rules. Companies, individuals, groups, and industries can therefore attach their own meanings to XML documents and create unique methods of interpreting those meanings. This has allowed XML to serve as the basis for hundreds of markup languages including one dedicated to mathematical formulas and another developed to store archaeology research data.
One of the markup languages based on this metalanguage template is XHTML, a revised version of the HTML. XHTML and XML share a similar set of rules that govern how tags can be used, but the former uses predefined tags to convey structural information to web browsers; a <p> tag denotes a paragraph, while an <h1> identifies a level one heading. All tags in XHTML have established functions, and new tags must be approved by the World Wide Web Consortium before they can be included in any future version of the language.
It is common to find both XHTML and XML used online, but they are generally used for different purposes. The former is most often used to code webpages, while the later is put to work in the back end of complex web applications and databases. Closer to the end user, XML-based languages like Atom and Really Simple Syndication (RSS) enable web feeds and podcasting. XML’s versatility has also led to its use in offline environments, where it can be found in preference files and office document file formats.