History of XHTML
XHTML is a combination of XML and HTML, it is used to display content on webpages, and it must be marked up correctly with tags resulting in "well-formed" documents. Since this idea was bourne by the W3C, XHTML has gone through several changes.
This tutorial focuses on:
- Transition from HTML
- XHTML 1.0
- XHTML 1.1
Transition from HTML
XHTML evolved out of HTML to serve an important purpose on the world wide web.
Many pages on the world wide web contain what is deemed as bad HTML. It is said to be as such because of certain errors within the code such as missing closing tags, tags not closed in the proper order, and attributes not quoted.
XHTML was created to combat these errors. By setting rules that should be followed in HTML such as all tags must be closed and all tags must be properly nested, XHTML set forth an improvement in HTML code. An improvement that would result in cleaner, more efficient code as well as better usability for webpage visitors.
The first version of XHTML, XHTML 1.0 became a W3C recommendation on January 26, 2000. It was not much different from HTML 4.01, but XHTML 1.0 contained a bunch of new XHTML syntax rules and XHTML tag rules that needed to be followed.
The combination of the purpose of HTML (displaying content on webpages) and XML (marking up everything correctly with tags to create "well-formed" documents) has resulted in XHTML - a markup language that is very practical for building web pages and will continue to be for a while.
With the introduction of XHTML, web developers had to classify their documents into one of three document types which include transitional (documents that contain deprecated features), frameset (documents that contain frames, and can also contain deprecated features), and strict (documents that contain no deprecated features and no frames).
Read about XHTML document types in detail at our XHTML document types tutorial.
XHTML 1.1 was not that much different from XHTML 1.0. What was new about it was the introduction of modules.
In XHTML, a module is a set of related elements. For example, there is the Forms module which contains the various form elements you can display on a webpage, or the Tables module which contains the various table elements you can display on a webpage.
The purpose of this modularization was to split HTML elements into groups of several related elements. Instead of using the entire XHTML language set, web developers can choose which modules to use for various devices. Modules allow for user agents other than web browsers to choose which elements to support while remaining consistent with the XHTML standard.