W3C home > Mailing lists > Public > www-html@w3.org > September 2007

Re: tables in html? (separating content bla bla)

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sat, 22 Sep 2007 15:14:21 +0300 (EEST)
To: "www-html@w3.org" <www-html@w3.org>
Message-ID: <Pine.SOC.4.64.0709221458330.442@hopeatilhi.cs.tut.fi>

On Sat, 22 Sep 2007, David Woolley wrote:

> It's a design principle of HTML that it should not be used to achieve layout 
> effects.

Is it? In reality, HTML specifications and implementations have many 
features for the sole purpose of affecting layout. Moreover, some 
elements, though nominally defined in a layout-independent manner, as 
semantic elements, are _mostly_ used for layout only. This applies to 
<table>, <blockquote>, <dl>, for example. Layout tables are far more 
common than data tables.

> The ideal, is that your provide the layed out text without the 
> layout and then arrange it physically with CSS.  CSS may not be adequate, but 
> that is a problem that needs to be fixed in CSS, not in HTML.

Yet, independently of the drawbacks of CSS specifications (we are supposed 
to ignore the two existing CSS specifications and to take a working draft 
as the de facto standard) and implementations, the idea of making _layout_ 
instructions external to the document proper is far from simple. Try to 
design a simple layout, say three columns, with one banner above and one 
trailer below, and covering the entire canvas. This is easy using an HTML 
table and a nightmare using CSS, and it is not just how CSS has been 
designed; it's the idea too. Table markup is easy and comprehensible, as 
compared with positioning, floating, and miscellaneous tricks. Table 
markup corresponds to how people _think_. They take a rectangle and divide 
it into smaller rectangles, in a table-like manner.

If CSS is to handle layout issues nicely, _it_ should have something 
comparable to table markup in simplicity. But would this approach (which 
might be realized in a decade or two) really be an improvement over layout 
tables? Exactly how? Not just in theory, but as tangible benefits.

Thus, I can well understand the idea of separating layout tables from data 
tables. They could share the same basic syntax but with different 
restrictions. Much like WCAG 1.0 says about tables; e.g., in layout 
tables, don't use <th> or other _structural_ elements - and in data 
tables, summary="..." might be made obligatory. Nonvisual user agents 
should interpret a layout table just as a collection of elements (cells), 
whereas they should give special treatment to data taböes.

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Saturday, 22 September 2007 12:14:35 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:21:04 UTC