Beyond Dreamweaver - Is XHTML Worth Learning?

A few years ago, I decided to wean myself from using Dreamweaver in the design of web sites, and jump on into HTML coding. I was initially pleased to learn that a designer can develop pleasant-looking, fast-downloading web pages with a minimum of about 20 commands.

After visiting the World Wide Web Consortium site, however, I learned that there is a movement afoot to phase out HTML in favor of a more accurate language, XML (Extensible Markup Language). What's more, there is also a transitional markup language called XHTML. After visiting several web designers' sites and discussion groups, I learned that there is currently considerable confusion as to the relative merits and practicality of these three languages.

Okay, so I'm a newbie when it comes to markup languages, but if even the veterans are confused about the direction these languages are heading...

Let's Start with XML 

XML is a "meta-language" that permits the creation of other sub-languages. With XML, markup tags can be created that are specific to a particular industry, such as insurance, banking or film-making. Tags for musical and mathematical notation can be created. The only rule is that they must be well-formed; i.e., with a beginning and ending tag.

The real power of XML, however, lies not in the display or rendering of documents, but in the process of data capture and exchange. XML uses the XSLT (Extensible Style Language for Transformations) to transform XML documents, for example, from XML to PDF format. This transformation capability makes XML documents adaptable to different display devices - not only monitors, but also pagers and wireless devices, including cell phones. The data in the document can be rendered in an identical manner, no matter what the display device.

The World Wide Consortium, which is currently setting the standards for XML, feels that XML is indeed the wave of the future for web markup languages.

XML and Cascading Style Sheets 

Cascading Style Sheets will play a much more crucial role in XML than in HTML. For one thing, CSS prevents the slow download times caused by too many markup tags on an HTML sheet, like constantly creating the font tag in-line. Instead, you just change the attributes in the style sheet instead of having to change each tag on every page.

The W3C's concept, then, is that XML plus CSS equals a polished web document in any browser and on any platform.

XML's creation of sub-languages also assists in the process of "internationalization" of the web. It enables the use of non-ASCII character sets, which permits web pages in Japanese or Icelandic. In fact, XML even has a "lang" attribute which tells the browser which language character set is used on the page. XML uses the Unicode language set which, the last time I checked, included some 50,000 characters from various European and Asian languages.

Enter XHTML 

Now, if HTML is to become passť and be replaced by XML, then there should be a transitional language, according to the W3C. Why is this? Because there are now millions of web pages on the 'Net, written in sloppy HTML. Instead of converting them all to XML - a laborious job which few people would do - why not simply alter the pages so that they conform to XML standards; i.e., well-formed, using only CSS, with no deprecated tags, etc.? Thus, the W3C has created (and is recommending) an interim language called XHTML.

The language has one dominant standard today, XHTML 1.0, although the first working draft of XHTML 2.0 was released in August 2002.

The big difference between HTML and XHTML is that it is a much more precise markup language, and must conform specifically to the requirements of XML. Unlike its predecessor HTML, XHTML must be correctly nested, use end tags, is case-sensitive, and its attributes must be in quotes. There are a few more requirements, but they're minor. The good news here is that if you know HTML, then you already know most of XHTML.

So, Should You Learn XHTML? 

Old HTML documents have been likened to the old mainframe programs that contained two digits for the year, thus bringing on the Y2K problem. But is there going to be a mad rush to learn XHTML, in order to avoid some future Web catastrophe? I doubt it.

Will future versions of Front Page generate only code that conforms to XHTML standards? I'd like to see the W3C force Microsoft to do that.

Furthermore, if browsers are going to be backward compliant anyway, why bother to learn XHTML? (The W3C sets standards; it doesn't sell browsers. No doubt Netscape, Opera and IE will remain backward compatible for a long time.)

By: Roy Troxel

AddThis Social Bookmark Button

Tell a Friend