Introduction

This document sets out a revised proposal for the HTML table model, following discussions at the Danvers IETF meeting and discussions over email. The proposal is backwards compatible with the HTML+ specification and the implementation in the Netscape 1.1 browser. The HTML 3.0 specification is currently being rewritten to take into account recent discussions, and will incorporate the new table model in the next revision to the HTML 3.0 Internet Draft. The proposal goes beyond the earlier model and folds in some of the features of the CALS table model. The proposal has been designed with a view to the effective use of associated style sheets for richer control over appearence.

Design Influences

The html table model has evolved from studies of existing SGML tables models, the treatment of tables in common word processing packages, and looking at a wide range of tabular layout in magazines, books and other paper-based documents. The model was chosen to allow simple tables to be expressed simply with extra complexity only when needed. This makes it practical to create the markup for html tables with everyday text editors and reduces the learning curve for getting started. This feature has been very important to the success of html to date.

Increasingly people are using filters from other document formats or direct wysiwyg editors for html. It is important that the html table model fits well with these routes for authoring html. This effects how the representation handles cells which span multiple rows or columns, and how alignment and other presentation properties are associated with groups of cells.

A major consideration for the html table model is that the fonts and window sizes etc. in use with browsers are not under the author's control. This makes it impractical to rely on column widths specified in terms of absolute units such as picas or pixels. Instead, tables are dynamically sized to match the current window size and fonts. Authors can provide guidance as to the relative widths of columns, but user agents are expected to ensure that columns are wide enouh to avoid clipping cell contents.

This proposal extends the html table model to support dynamic display of table contents as the table data arrives from the net. This feature requires the author to specify the number of columns, and includes provision for control of table width and the relative widths of different columns.

The Department of Defense's work on CALS has established a de facto standard for SGML table models. The html table model builds upon experience gained with CALS, whilst avoiding some of the complexity associated with a simple minded adoption of the CALS model. Both models share the row-major treatment of tables, i.e. treating tables as a sequence of rows, which in turn, consist of a sequence of cells. This has worked well in practice. An alternative would be to represent the table as a sequence of columns, which in turn, consist of a sequence of cells. Both this and hybrid techniques were considered early on as candidates for html.

In CALS you can group table rows into head, body and foot sections. This is frequently used to repeat table head and foot rows when breaking tables across page boundaries. CALS further allows you to use repeated groups of head/body/foot sections. This is generally thought to be unnecessary, and can be avoided by using a separate table for each such group. This proposal allows authors to use the head, body and foot sections for html tables only when needed.

There are many potential properties relating to the presentation style of table cells, for instance, the border width, margins, vertical and horizontal alignment within cells, foreground and background colors and textures. The html proposal uses the same alignment properties as CALS, but separates off the representation of vertical and horizontal alignment using a more flexible treatment than CALS. The html table model also simplifies the treatment of borders, as this can be better handled along with other rendering properties through associated style sheets.

The html table model permits arbitrary nesting of tables, unlike CALS. The processing time and memory requirements for laying out tables are linear with the depth of nesting and the size of table contents. The widespread deployment of Netscape 1.1 has provided an effective test of the core model, robustly handling a very wide range of tables.

For the visually impaired, html offers the possibility of setting to rights the damage caused by the adoption of windows based graphical user interfaces. The html table model includes attributes for labelling each cell, to support high quality text to speech conversion. The same attributes can also be used to support automated import and export of table data to databases or spreadsheets.