Pages

4.08.2005

SGML CALS Table Model in XHTML

I discovered recently that the CALS Table model is used for tables in HTML 4.01 and XHTML. This is most useful for their original purpose in marking up tabular data, like uwto.org - Transit Facts

This means that <thead>, <tfoot>, and <tbody> have been part of the HTML standard since 1999.

<table>
<thead>
</thead>
<tfoot>
</tfoot>
<tbody>
</tbody>
</table>

A couple of years ago I redesigned my uwto.org site and reformatted any pages that used tables for layout purposes to one using CSS 2.1 stylesheets.

Now that we have CALS stuff to use, I've been experimenting a bit with it. For example, with CALS you can define a header area using and when that table is printed and flows past one page, the browser printer engine willl automatically reprint all the column header and footer labels on each page. This is similar to how you can "lock" a column or row in a spreadsheet and scroll through while leaving the headers in place.

I've also experimented with the <colgroup> and <col> related tags. They're supposed to allow formatting for alignment of numerals. It works in IE 6 but surprisingly not in the more HTML standardized Mozilla/Firefox browsers. Someone posted a hack that uses Javascript but I'd rather not get into programatic ways of displaying web documents if I can help it, excepting a CMS system.

There is a long-standing (7 yrs.!) non-implementation bug report filed as BugZilla #915

No comments: