Website Design Edmonton       Website Design Feedback       Website Design Sitemap     Contact Website Design Company
Website Designers R Us - Home
The table structure

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!

 

Return to Listing

Website Designers R Us is a professional Internet strategy and Web design company based in Toronto, Canada. We specialize in best-in-class website design, online marketing, Flash multimedia, corporate identity and print graphics. Website Designers R Us features an integrated team of web consultants, creative designers, writers, programmers and marketing professionals that know how to get online results
 Home          ::             About Us          ::             Support            ::             Services            ::             Link Partners          ::             Contact

Copyright © 2006-2011 Website Designers R Us, a DOT Specialist Company. All rights reserved.