Site Archive (Complete)
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
January 01, 2002
XHTML

What I Learned this Summer: XHTML

WebReview.com:What I Learned this Summer: XHTML

As summer begins, so does our next major topic: XHTML. This latest member of the standard HTML family tree offers some features and a number of nits and bothersome details. As we'll see in the coming weeks, you already know most of XHTML, and absorbing the rest will be easy.

XML

To understand XHTML, you must first know a bit about XML, the eXtensible Markup Language.

As we all know by now, HTML was cobbled together over the years with a less-than-rigorous eye towards standards. As it matured, HTML was firmed up and standardized, so that the latest 4.01 standard is fairly consistent and well-defined using SGML, the Standard Generalized Markup Language. SGML is very rich, very powerful, and very difficult for mere mortals to use. As a result, it is not a good tool for most people to create new markup languages or to define extensions to HTML.

HTML has its shortcomings, and lots of people would like to extend HTML to handle new kinds of markup, like chemical formulae or musical notation. With SGML so difficult to use, the W3C has created a subset of SGML known as XML, The Extensible Markup Language. XML keeps the best features of SGML, drops the hard and confusing stuff, and is intended to be the standard language for describing new kinds of HTML-like markup languages.

XML has a special syntax that is used to define the elements of a markup language: the beginning and end tags, the attributes, and the correct way to arrange these elements. You place these rules in a Document Type Definition (DTD). You can use the elements in a DTD to create a document, and a browser (or"processing agent," as the W3C likes to say) can use the DTD to figure out how to parse and process your document.

XHTML

While you can use XML to create almost any kind of markup language, the first important task using XML at the W3C was to rewrite the HTML 4.01 standard using XML. The resulting markup language is known as XHTML 1.0, the Extensible Hypertext Markup Language. XHTML 1.0 is very similar to HTML, with a few notable differences that we'll cover in the coming weeks.

Is XHTML important? Yes. Clearly, there are billions of existing Web pages that do not, and never will, conform to the XHTML 1.0 standard. Most of these pages don't even conform to the HTML 4.01 standard! To be honest, no one has the time or inclination to convert all these pages to XHTML, especially if the end user will never be able to tell the difference.

In spite of all those legacy HTML pages, there are many more pages yet to be created. There is no reason why those pages cannot be created using XHTML, especially if they are built using authoring tools that emit XHTML automatically. While browser support for XHTML is nonexistent at this point, that will change over time, making XHTML a more attractive Web authoring language. What's more, XHTML syntax is so similar to HTML that browsers have little difficulty reading XHTML documents. And, what they don't understand, they ignore, which allows you to put XHTML 1.0 to use today.

The bottom line is that XHTML is here to stay. All future versions of HTML will be built upon the XHTML 1.0 standard, making HTML 4.01 the end of the line for the original language of the Web. A good Web author will learn XHTML now, understand the differences between XHTML and HTML, and design pages that are compatible with both standards whenever possible. Your easiest path to all this new knowledge is right in this column for most of the summer. Get ready to start next week, as we cover the basic syntax of every XHTML document.


Chuck is the author of the bestselling HTML: The Definitive Guide. He also writes on a variety of Internet and Web-related topics for a number of online magazines.


Previously in Tag of the Week:

Controlling Element Properties - the "box model" for managing space around elements.

Using the Color Property - using the "color property" to engage your visitors.

Condensing Background Properties - how to use the single background property.

Custom Bullets -Get ready, aim, and fire off a few rounds of custom bullets.

DR. DOBB'S CAREER CENTER
Ready to take that job and shove it? open | close
Search jobs on Dr. Dobb's TechCareers
Function:

Keyword(s):

State:  
  • Post Your Resume
  • Employers Area
  • News & Features
  • Blogs & Forums
  • Career Resources

    Browse By:
    Location | Employer | City
  • Most Recent Posts:
    MEDIA CENTER  more
    NetSeminar
    Solving the Multicore Programming Problem
    Processor raw speed gains are hitting a brick wall of power consumption. The voracious appetite for performance now must be sated through the use of multiple CPUs. The problem: multicores are hard to program. Chuck Moore of AMD said "To make effective use of multicore hardware today, you need a PhD in computer science." Learn how Gedae expands the pool of multicore developers while offering unrivaled performance and productivity. Event Date: Wednesday, June 11, 2008.
    Finding Runtime Concurrency Errors in Multithreaded Java Applications
    Join Coverity on June 3 at 2:00 PM ET / 11:00 AM PT for a web seminar "Finding Runtime Concurrency Errors in Multi-threaded Applications." In this session Thomas Schultz of Coverity's Advanced Technology Group will offer a presentation and demonstration of Coverity Thread Analyzer for Java, a new dynamic analysis solution for multithreaded Java applications that automatically and predictably detects existing and potential race conditions and deadlocks that can cause deadly application behavior. Register today and find out how to:
    • Automatically and rapidly detect serious concurrency errors
    • Avoid data corruption and application failures
    • Sharply reduce the problem of testing billions of unpredictable thread interleavings
    • Reduce risk of migration to multicore systems
    • Combine dynamic and static analysis to improve overall code quality
    Creating Software Like a Band Plays Jazz: The Future of Software Delivery
    The workforce of the future is changing, becoming increasingly organizationally and globally distributed, fluid and dynamic. And nowhere is this shift more visible than in the domain of software delivery, where business and technical expertise is increasingly distributed across town or around the world. Join us as two IBM luminaries, renowned software futurist Grady Booch and Eclipse luminary Erich Gamma, explore IBM's vision of the future and what IBM is doing to realize this vision with the Jazz project and Rational Team Concert. Event Date: Tuesday, June 17, 2008
                                   

    ♦ sponsored
    EVENTS

    July 21-24, 2008
    Chicago, IL
    Find real-world solutions to your biggest software architecture challenges at Architecture & Design World 2008. Register by June 20 and save up to $300!
    The Dobbs Challenge
    THE DOBBS CHALLENGE
    Download the Dr. Dobbs Challenge game for either Windows or Windows Mobile and modify it using Visual Studio 2008. Win $10,000!
    INFO-LINK

    Resource Links:




    Related Sites: DotNetJunkies, SD Expo, SqlJunkies