Implementation Issues for Tables
[Top] [Up] [Next] [Previous]

9.1 - Implementation Issues for Tables


Browsers need a prepass through the table markup to count the number of columns and determine their widths. A simple algorithm that takes merged cells into account will suffice. Text fields wrap to fit their columns, which should be sized to best match current window width. This information should be cached to avoid speed penalties during subsequent screen refresh/window resize operations. Browsers can ignore alignment hints if required, and using a fixed pitch font may speed up the sizing step.

The number of columns is given by the row with the largest number of <TH> and <TD> elements, remembering to add in merged cells. The widths of columns are evaluated by finding the minimum and maximum widths needed for each cell, and hence the minimum and maximum width for the column as a whole. All this can be done during a single pass through the <TABLE> element. Caching these min/max values for each column then permits the browser to instantly adjust the table when the window is resized.


HTML+ Discussion Document - November 8, 1993

[Top] [Up] [Next] [Previous]