FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
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.

RELATED ARTICLES
No Related Articles
TOP 5 ARTICLES
No Top Articles.
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
    Reduce Costs, Risks and Resource Constraints with Web Application Security OnDemand
    Not surprisingly, Web application security & compliance continues to be a top priority for companies who rely on their Web site to transact business. But in these challenging economic times, managing costs while reducing risk becomes an added challenge. Join us for this 1-hour webcast and let us share with you the importance of Web application security and our Security as a Service. Date: Tuesday May 26, 2009 Time: 9 am PT/12 pm ET
    Modernize your Development by Moving Build and Code Quality Upstream
    Moderated by Jon Erickson, Editor-in-Chief of Dr. Dobb's, this interactive panel discussion brings industry experts Anders Wallgren, CTO of Electric Cloud and Gwyn Fisher, CTO of Klocwork together for a candid discussion of the cost savings, productivity and quality benefits that can be achieved by stabilizing builds and code quality as early in the development cycle as possible.

    The reality of today's development environment - geographically distributed teams, the use of Agile development practices, increasing application complexity, etc. - is straining the viability of the traditional coding, build and release process. To stay ahead of the curve, development teams are modernizing their approach to dealing with these issues, and as a result are achieving new levels of development productivity. Register for the webcast.
    Date: Wednesday, July 15, 2009
    Time: 11 am PT/2 pm ET
                                   
    CONTEST

    Challenge Winners Announced
    The results are in for Dr. Dobb's Challenge Deuce, and the winners are some of the most innovative Silverlight games out there. Play the winning games.
    INFO-LINK

    Resource Links:




    Techweb
    Informationweek Business Technology Network
    InformationweekInformationweek 500Informationweek 500 ConferenceInformationweek AnalyticsInformationweek Events
    Informationweek MagazineGlobal CIOIWK Government ITbMightyByte and SwitchDark Reading
    Digital LibraryIntelligent EnterpriseInternet EvolutionNetwork ComputingPlug Into The CloudDr. DobbsContentinople
    space
    TechWeb Events Network
    InteropVoiceConWeb 2.0 ExpoWeb 2.0 SummitEnterprise 2.0Mobile Business ExpoNoJitter
    Black HatGTECEnergy CampCloud ConnectGov 2.0 ExpoGov 2.0 Summit
    space
    Light Reading Communications Network
    Light ReadingLight Reading AsiaUnstrungCable Digital NewsInternet EvolutionPyramid Research
    Heavy ReadingLight Reading LiveLight Reading InsiderEthrnet ExpoTelco TVTower Technology Summit
    space
    Financial Technology Network
    Advanced TradingBank Systems and TechnologyInsurance and TechnologyWall Street and TechnologyAccelerating WallstreetBST SummitBuyside Trading SummitIT Summit
    space
    Microsoft Technology Network
    MSDNTechNetTotal IT ProTotal Dev ProNET Total Dev Pro CommunitySQL Total Dev Pro Community
    space