HTML
  Home arrow HTML arrow Page 3 - XHTML Explained
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

XHTML Explained
By: Mitchell Harper
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 4
    2001-12-29

    Table of Contents:
  • XHTML Explained
  • XHTML Defined
  • XHTML Benefits
  • DTD's
  • XHTML Examples
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    XHTML Explained - XHTML Benefits


    (Page 3 of 6 )

    XHTML documents are backward compatible with older, non-XHTML compliant web browsers. Instead of sloppy HTML tags, your pages will now contain XML tags that are always properly closed and nested correctly, such as:

    <p><b><u>This is some text<br /><br /></u></b></p>

    Instead of:

    <p><b><u>This is some text<br><br></b></u>

    You can see that the XHTML version of the code above has a <p>, <b>, and then a <u> tag. These tags are closed in the reverse order that they were created in: </u>, </b>, and lastly </p>. All tags must be closed in this way for the XHTML document to be considered valid.

    Also, notice the <br /> tags? Because of the way non-XHTML browsers are designed, as long as you leave a space between the beginning of the tag and the “/>”, then they will just treat the tag normally, and ignore the forward-slash.

    XHTML is a standard

    XHTML is an accepted standard (see http://www.w3.org/TR/xhtml1/), meaning that all of the newer browsers due for release over the next couple of months (such as newer version of IE, Netscape and Opera) will most definitely contain built-in support for XHTML.

    The first document type in the XHTML family is XHTML 1.0. The W3C standard for XHTML takes three of the previous document types from HTML 4.0 and converts them to fully utilize XML wherever possible. This promotes a consistent, logical layout, while still keeping the actual content easy to follow.

    XHTML documents must incorporate one of three document type definitions (DTD’s). This makes sure that the XML data contained within an XHTML document is valid and conforms to a certain layout/logical style as defined in that DTD file (more on DTD’s below).

    You might be wondering what the benefits of migrating your current HTML documents over to XHTML are; you may also be wondering why you should bother learning more about XHTML; well, let me point out some of the benefits of XHTML (as listed at http://www.w3.org/TR/xhtml1/):
    • XHTML documents are XML conforming. As such, they are readily reviewed, edited and validated with standard XML tools such as the MSXML parser.
    • XHTML documents can be written to operate as well or better that they did before in existing HTML 4-conforming user agents as well as in new, XHTML 1.0 conforming user agents.
    • XHTML documents can utilize applications (e.g. scripts and applets) that rely upon either the HTML Document Object Model or the XML Document Object Model (DOM).

    More HTML Articles
    More By Mitchell Harper


     

    HTML ARTICLES

    - Completing Construction of a Database Form w...
    - Maximizing and Restoring Images in a Tabular...
    - Building the Recordset for an HTML Database ...
    - Laying Out a Database Form with HTML
    - Tabular Database Form Functions with HTML
    - Tabular Database Forms with HTML
    - Using the Find Functions for HTML Database F...
    - Sorting for Database Forms with HTML
    - Edit and Other Database Form Functions with ...
    - More Database Form Functions with HTML
    - Database Form Functions with HTML
    - Using the HTML Table Element as a Recordset
    - Building Single Row Database Forms with HTML
    - Introduction to Database Forms with HTML
    - Another Look at Animation of Geographical Ma...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT