HTML
  Home arrow HTML arrow Page 4 - An Introduction to XHTML
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 
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

An Introduction to XHTML
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 37
    2004-12-01

    Table of Contents:
  • An Introduction to XHTML
  • No lazy programming allowed
  • Conform to the rules
  • The table structure
  • Namespace awareness

  • 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


    An Introduction to XHTML - The table structure


    (Page 4 of 5 )

    One thing that XHTML has improved upon is the table structure. All table-formatting tags have been deprecated in favour of CSS, but there are several new structural elements that can be used when working with tables. Although these elements could be classed as formatting elements, they are more focused on creating the physical structure and layout of the table rather than changing the appearance of existing table elements.

    The new elements are:

    • thead
    • tbody
    • tfoot
    • colgroup
    • col

    To see how these elements work, create an XHTML file as follows:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>XHTML Table Elements</title>
    </head>
    <body>
    <table>
      <thead>
        <tr>
          <th colspan="2">XHTML Elements</th>
          <th colspan="2">Rules to Remember<th>
        </tr>
      </thead>
      <tfoot>
        <tr>
          <td colspan="4">Remember these simple rules and XHTML will be easy!</td>
        </tr>
      </tfoot>
      <tbody>
        <tr>
          <td>1</td>
          <td>Use DTD Declaration</td>
          <td>1</td>
          <td>Close all elements correctly</td>
        </tr>
        <tr>
          <td>2</td>
          <td>Use the namespace declaraton</td>
          <td>2</td>
          <td>nest elements correctly</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td>3</td>
          <td>Enclose all attributes in quotes</td>
      </tbody>
    </table>
    </body>
    </html>

    This is an extremely basic example and does not encapsulate all of the XHTML rules of structure and syntax! I have omitted the <colgroup> and <col> elements as these seem to work solely with the "align" attribute, which shouldn't really be used.

    The form structure of XHTML is extremely similar to that of HTML with the exception of the File input type. Using this form control will allow users accessing a form to upload files to the server. This control can be used in the following way:

    <input type="file" accept="image/*" />

    This will allow any image type to be uploaded. The file types that can be entered as values of the accept attribute are MIME types. Additionally, the frameset structure is exactly the same, just remember to use the frameset DTD!

    More HTML Articles
    More By Dan Wellman


       · The accessibility enhancing table structure elements were already introduced in HTML...
       · Having learned HTML 4.0 some time ago and then not taking much time going over the...
     

    HTML ARTICLES

    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP







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