HTML
  Home arrow HTML arrow Page 3 - W3C Web Standards
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  
Mobile Linux 
App Generation ROI 
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

W3C Web Standards
By: Justin Cook
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 35
    2004-04-12

    Table of Contents:
  • W3C Web Standards
  • An Eagle's-Eye View
  • First Component: XHTML
  • Attributes
  • Second Component: CSS2
  • Code Explanation
  • Third Component: ECMAScript

  • 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


    W3C Web Standards - First Component: XHTML


    (Page 3 of 7 )

    XHTML, for those of you who don't already know, is simply an amalgamation of XML and HTML, no surprises there. Chances are that you're well versed in HTML, so don't bother rushing out to by a book on XHTML. There are just a few simple rules that we must now comply with. If we do this successfully, we open up so many exciting opportunities for our document! I mean, think about it, our document will actually become well-formed XML. We could interact with so many applications and scripts and applets and and and... Alright, it's not as exciting as I made it sound, but it's darn handy.

    Rule Numero Uno: Well-formedness

    This primarily means that all elements are properly closed, as well as nested properly. Let me explain these both clearly, as well as the further aspects of XHTML.

    Nesting

    Many times in HTML we could get away with overlapping elements.


    <p>This is <strong>overlapped (tsk tsk).</p></strong>

    That is morally wrong, unethical, just plain bad. It should be:


    <p>This is <strong>nested (beautiful).</strong></p>

    Don't try to get away with overlapping anymore, it just won't be tolerated. Consider yourself forewarned!

    I Need Closure on that Anecdote!

    Remember those days when it was getting near quitting time, and you were getting lazy?


    <p>You know what I mean<p>Don't you?!<p>Ahh, the lazy coder style...

    Give yourself a slap on the wrist! We must shape up, as XML does not permit the omission of closing tags.


    <p>Let's try this again.</p><p>Ahh, much better</p>

    'But' you challenge, 'how do you plan to handle empty tags like <br>s and <hr>s?' First of all I commend you for asking, and I assure you, the answer is simple. Take a look:


    <hr />
    <img src=/images/logo.jpg” /><br />

    There, that's it! That simple little slash at the end terminates the element, and our parser is happy.

    More HTML Articles
    More By Justin Cook


       · Nice article Justin. Clear quiet a few things related to W3C Web Standards.
     

    HTML ARTICLES

    - Using a 3D HTML Table as a Recordset
    - Building a 3D HTML Table
    - Maximizing and Restoring HTML Images: Layer ...
    - 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






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