XTML was created for one basic purpose: To create HTML Tables quickly and easily.
The HTML of the end of the 1990s had become large, cumbersome to process, presentation oriented. This had dramatic impacts on accessibility and the web's device independence. Rather than being "access to information by anyone, anywhere, regardless of disabilities" the web had become "access to anyone with a browser on a PC with reasonable eyesight and few if any disabilities."
Recognizing this, the World Wide Web Consortium founded by now Sir Timothy Berners-Lee (inventor of the Web, HTML and HTTP) developed XHTML.
The underlying aim of this project is to build a solid foundation for the future of content on the World Wide Web. It is expressly designed to overcome many of the issues with device dependence and accessibility that developed along with the ad hoc development of HTML.
Like HTML, XHTML is a markup language. It has the same expressive capabilities as HTML, but a stricter syntax. This is because XHTML is an application of XML, while HTML is an application of the much older, pre web SGML. XML is an international standard language for developing other markup languages. It was designed as a newer generation of SGML, specifically for markup languages in a networked world.
XHTML's purpose first and foremost to be HTML as an application of XML. With this, come the benefits associated with all languages which are applications of XML.
XHTML is a much simpler, cleaner language than HTML. This makes learning, coding, and maintaining XHTML code much more straightforward. XHTML was designed explicitly as a device independent language. HTML 4 is a large, complex language. For many web-enabled devices, such as mobile phones, with limited computing power, the complexity of HTML presents significant obstacles. XHTML was explicitly designed with accessibility in mind. It is not an afterthought.
One benefit that is not widely understood is that as an application of XML, XHTML is XSL ready. XSL, or the eXtensible Stylesheets Language not only allows for the styling of XML documents, more importantly it allows for the transformation of documents.
But above all, XHTML is the future of the World Wide Web, at least for many years to come. There will be no new versions of HTML. XHTML works on any reasonably modern web browser today (that would mean just about every one in use). And it will work on all web browsers for the foreseeable future.
One of the major steps in transitioning to XHTML is the need for a change in outlook. HTML is seen by most developers and content creators as purely a human oriented technology. But increasingly machine processing, whether by search engines, accessibility devices such as screen readers, or browsers themselves is becoming as important for online information as the human readers of content. HTML developers still largely conceive of their content in terms of how it will appear as rendered in a browser to human readers. XHTML is much more oriented toward the information architecture of content, to the structure and semantics of the information.
Consequently, most HTML content is quite frankly an invalid mish-mash of invalid pseudo HTML, which "works" in a couple of major browsers (or probably only on IE6 for windows). This is a disaster in terms of device independence and accessibility, as well as forward compatibility of content. Such sites are largely inaccessible to machine processing, which with the increasing sophistication of search engines such as Google, and similar information processing devices is popularity suicide.
What should we be doing to transition to XHTML? There are a number of steps in the process of transforming your HTML content to XHTML. These can be don one at a time, or simultaneously.
Pretty soon:
- Preserve vertical alignment (especially now that XTML handles carriage returns within cells).
- An option to 'compact' the output HTML code to reduce all the carriage returns.
This would result in smaller HTML files, but they would be less readable.
- Set 'row-level' alignment in the <tr> tags, if it would reduce the repetition in the <td> tags.
A little later (maybe):
- Handle 'rowspan'
- Nested tables.
The purpose of XHTML 1.0 was to transition HTML into an XML vocabulary. It introduced the constraints of XML syntax into HTML: case-sensitivity, compulsory quoted attribute values, and balanced tags. That done, XHTML 2.0 seeks to address the problems of HTML as a language for marking up Web pages.
W3C's Steven Pemberton expressed the design aims of XHTML 2.0:
- Use XML as much as possible: Where a language feature already exists in XML, don't duplicate or reinvent it.
- Structure over presentation: Thanks to CSS style sheets, you no longer need explicitly presentational tags in HTML.
- Make HTML easier to write: Remove some of the needless idiosyncrasies of HTML.
- More accessibility, device independence: Make as few assumptions as possible about the way a document will be read.
- Improved internationalization.
- Better forms: Long overdue improvements are required!
- Reduce the need for scripting: Include typical scripting usages in HTML itself.
- Better semantics: Make it easier to integrate HTML with semantic Web applications.
These aims certainly appear pretty laudable to anybody who has worked with HTML for a while. I'll now take a deeper look at some ways in which they were achieved in XHTML 2.0.
The process of future proofing your web content by transitioning to XHTML may initially appear daunting. The fact is that developers and organizations usually find it less difficult and more rewarding than expected.
With the increasing use of a wide range of devices, and the growing emphasis on accessibility, as well as the increasing sophistication of web processing by search engines and other services, can you afford to continue with outdated content development and management practices?