Archives

Web Page Width and Fixed vs. Fluid Designs (current)

What is XML, Why and How Is It Used? (June 11, 2008)

Web Careers: Job Titles and Skills (January 15, 2008)

What is XHTML? (December 15, 2007)

AJAX and Spry (September 18, 2007)

HTML 5 and XHTML 2.0? (July 20, 2007)

HTML Reference - Learn HTML Tags (April 6, 2007)

Amazing Internet/Web Advancements (March 26, 2007)

Web Design and Development Process (March 24, 2007)

Firefox, FoxIt, TerraGen, and Expression Web (March 5, 2007)


Web Tips and News

HTML 5 and XHTML 2.0?   Posted: July 20, 2007

Note: This article provides detailed and somewhat technical information on the history, current state, and future of web languages. Such information is often more debated by and interesting to experienced web developers and geeks. Nevertheless, beginning web developers just learning HTML may also find it interesting. There is the detail of syntax that are important to learn as a beginner, and then, as is the case with this article, the industry trends and standards of languages.

While many in the web design and development field have been making (or planning for) the transition from HTML version 4.01 to XHTML 1.1, there now appears to be new versions of both on the way. An XHTML 2.0 makes sense since that the direction things were going. But wait, that's right - HTML 4.01 may not be the last version of HTML.

So, which direction are the standards going? Perhaps both for now. And only time will tell where things will end up. Given this news, this article will review the driving forces behind XHTML 2.0 and new version of HTML - HTML5, which will also benefit from a review of the state of the current HTML and XHTML version - HTML 4.01 and XHTML 1.1.

HTML and HTML 4.01
The current version of HTML is HTML 4.01. HTML is the original language of web pages developed by Tim-Berners-Lee, who now oversees the vendor-neutral W3C organization that develop influential standards for web development, including HTML and XHTML. Each new version of HTML added new tags and features, and deprecated (retired) others. For example, HTML 3.2 added tables, images, and headings. HTML 4 began the movement of using CSS for formatting and laying out the web pages, seperating that from the content of the pages that would remain in HTML.

XHTML and XHTML 1.1
This takes us to 1999-2000, when the W3C began recommending XHTML 1.0 as the new standard and successor to HTML. HTML was created using the meta-language Standard Generalized Markup Language (SGML), which is a complex language used to create markup language. Like HTML, another child of SGML is XML. XML is a streamlined version of SGML specifically designed for web documents. It is most often used to describe data that will transferred across the Internet or web.

XHTML, then is merging of HTML and XML (or reformulation of HTML as an XML application). XHTML, which leverages XML, was intended to add the following capabilities to web pages:

  • XHTML would require web pages to be written using stricter, well-formed code (unlike XHTML doucments, HTML allowed syntactical errors to be overlooked, which could cause web browsers to interpret and dispaly the web pages diferently).
  • XHTML requires the content of web pages (the HTML) be seperated from the presentation, or formatting, of the web page using Cascading Style Sheets (CSS). The results in cleaner, more maintainable, flexible and efficient web pages.
  • XHTML improves the accessibility and portability of web pags allowing them to be displayed on any device (PDA, cell phone, etc.), as well by screen readers and other adaptive technology.
  • XHTML is extensible, meaning new tags can be added to it via 'namespaces', and other XML tools can be used with it, such as Scalable Vector Graphics (SVG), Synchronized Multimedia Integration Language (SMIL), and Wireless Markup Language (WML), Really Simple Syndication/Rich Site Summary (RSS), tools that allow XHTML documents to be converted to PDF, MathML, XSL, and XSLT.

XHTML 2.0
XHTML 2.0 is a working draft of the W3C and as such is slated to be the next generation language of web pages. XHTML 2.0 will introduce the following new features:

  • XForms which has many advantages of its predecesor HTML forms
  • XML Events which allow developers to define their own events and triggers (such as and beyond onclick and onouseover)
  • Inclusion of additonal Web APIs, such as those to support AJAX, Ruby, drop-and-drag activities, file uploading
  • XFrames will replace HTML frames
  • Improved internationalization
  • Any element can be a hyperlink, such as a list item or heading
  • Any element can have an alternative media with the src attribute
  • Greater device independence, accessibility, and semantics
  • Easier addition of metadata

Critics of XHTML and XHTML 2.0

Critics of XHTML and XHTML 2.0 point out that that the predominent browser on the web, Microsoft Internet Explorer, does not support a true XML/XHTML document ("true" meaning that the document not only has the correct DTD tag, but more importantly the web server has been configured to send the file as an XML MIME type). Opera, Firefox, and Safari do accepthandle XML/XHTML documents. This is a very important, valid point. And a big criticism of XHTMl 2.0 is that it is not backwards-compatible with HTML 4.01 or XHTML 1.1.

Add to this the fact that coding web pages in HTML 4.01 Strict produces the well-formed, syntactically proper code XHTML touts, the fact that using CSS with HTML 4.01 provides the same seperation of content from presentation sought in XHTML as well, and that many new portable devices, such as PDAs and cell phones, can now handle HTML web pages perfectly fine, many web developers see litle need to move to XHTML.

Even HTML inventor and W3C chair Tim Berners-Lee achknowledged the resistance by many to convert (and resurgence of HTML over XHTML and XML). In his blog, he wrote: "The attempt to get the world to switch to XML, including quotes around attribute values and slashes in empty tags and namespaces all at once didn't work. The large HTML-generating public did not move, largely because the browsers didn't complain."

HTML 5

Does the above criticism of XHTML mean an end to XHTML and XHTML 2.0? No, not at all. New web standards are always emerging and being fine tuned. And criticism and competition (which HTML 5 is) can be healthy.

XHTML 2.0 is considered by most to be a radical step forward with many implications. Because HTML 4.01 is so familiar to many and so widely accepted by browsers, perhaps, many argue, incremental improvements in HTML should be made via HTML 5. HTML5, which is still in working draft form, is being developed by the Web Hypertext Application Technology Working Group (WHATWG), and was recently approved to be reviewed by the W3C. What does being "reviewed by W3C" mean? It means that the W3C has not yet published an HTML 5 specification for widespread use, but is in the process discussing, reviewing, and editing a working draft. Publication of a specification could take at least several years. Note: In contrast to the W3C, which is vendor neutral organization, WHATWG is vendor-driven organization with its greatest influence coming from browser manufacturers, including Mozilla, Opera, and Apple Computer.

HTML 5, also referred to as Web Application 1.0, is seen as a more incremental, natural advancement to HTML that will preserve backwards-compatibility with HTML 4.01 and XHTML 1.0. HTML 5 will include improved form capabilities via Web Forms 2.0. Calendar controls, drop-and-drag, gauges and progress bars (known as widgets), menus, an address card, datagrid, better AJAX support, improved form data validation, and Javascript/canvas images.

Conclusion

Most web developers are probably best sticking with HTML 4.01, writing strict code with it, and utilizing CSS. HTML 4.01 is widely accepted and familiar. It might also be easier to convert a document from HTML 4.01 to HTml 5, that to convert a document from XHTML 1.1 to XHTML 2.0. But, if you plan to use XML in any form, i.e. MathML, SMIL, etc.


Good Resources

XHTML2 Working Group Home Page
http://www.w3.org/MarkUp/

WWW FAQs: What versions of HTML and XHTML exist, and when should I use them?
http://www.boutell.com/newfaq/creating/htmlversions.html

Which is better of HTML 4.01 Strict and XHTML 1.0 Strict?
http://blog.colorcharge.com/archives/2007/4/23/html_or_xhtml/

W3C: HTML and XHTML Frequently Answered Questions
http://www.w3.org/MarkUp/2004/xhtml-faq#need

To Use or Not to Use: An XHTML Roadmap for Designers
http://www.digital-web.com/articles/an_xhtml_roadmap_for_designers/

HTML5, XHTML2, and the Future of the Web
http://www.digital-web.com/articles/html5_xhtml2_and_the_future_of_the_web/

Making the switch to XHTML
http://articles.techrepublic.com.com/5100-22-5237333.html

Understanding HTML, XML and XHTML
http://webkit.org/blog/?p=68

The Benefits of XHTML modularization
http://www.webstandards.org/learn/articles/askw3c/dec2003/

Put XHTML 2 to work now
http://www.ibm.com/developerworks/library/x-xhtml2now.html

The future of HTML, Part 1: WHATWG
http://www.ibm.com/developerworks/xml/library/x-futhtml1/

Frequently Asked Questions About XHTML vs HTML
http://www.sitepoint.com/forums/showthread.php?t=393445

XForms
http://www.w3schools.com/xforms/default.asp

Reinventing HTML, by Tim Berners-Lee
http://dig.csail.mit.edu/breadcrumbs/node/166

X/HTML 5 Versus XHTML 2
http://xhtml.com/en/future/x-html-5-versus-xhtml-2/#x2-cool

Pretending to use XHTML
http://www.autisticcuckoo.net/archive.php?id=2004/10/25/pretend-xhtml