more CSS and tables Re: Some questions from CHI-WEB people

If you hhave marked up a page correctly, all the pieces will be idenitifed in
terms of their function (I realise that is a big IF). If you have also
followed WCAG recommmendations, it will be marked up in an order that makes
sense using the source-based flow.

For general layout, this means that CSS can provide column and block based
layouts for new browsers, that break down to fairly simple linear groups of
blocks in old browsers.

Chaals

On Tue, 25 Dec 2001, Kynn Bartlett wrote:

  At 8:12 AM -0500 12/25/01, Charles McCathieNevile wrote:
  >Just so we realise that this isn't an area where there is someone with all
  >the answers:
  >
  >CSS, definitely. CSS is uch friendlier to older browsers than tables.
  >(Especially to older browsers still in relatively wide use, like lynx).

  Not really.  If you're talking about old, old browsers, and you give them
  something like <div>s with CSS-P, it will flow it together in an old
  mess.  If you're talking about old, old browsers, and you give them
  <table>, at worst it does the same as lynx -- flows it together in one
  big mess -- and at best it will lay out the page exactly as intended.

  Here's why tables are better than CSS -- the semantic meaning is more
  clear.  In CSS, _any_ element can be used for layout purposes; most
  commonly it's <div>, the absolute most generic tag in the lot, short of
  its close cousin, <span>.  A <div> or a <span> can mean, literally,
  _anything_.

  Now, take <table>.  A <table> can be one of two things:  It can be a
  layout table, or it can be a data table.  Distinguishing between the
  two, if coded correctly, is not all that hard; data tables, for example,
  rarely are designed to fill the entire screen within a <body>, while
  layout tables usually don't have captions.

Well, you haven't demonstrated that the content being laid out in a table
would have any better identification, just where the pieces were in a table -
equivalent to what is provided in CSS positioning.

In addition, the use of tables for layout purposes is an express violation of
the specification of HTML 4, which CSS is not. Although this doesn't cause
the fall of empires (as far as I can tell) it is not a good start at
improving the Web...

  Therefore, <table> is a _lot_ clearer, within the markup, at indicating
  "this is a bit of markup which could be either a layout table or a
  data table" -- two choices.  CSS-driven layouts use elements which
  could be _anything_, from generic style groupings to content groups
  to layout groups to indications of language change to anything else.

  --Kynn



-- 
Charles McCathieNevile    http://www.w3.org/People/Charles  phone: +61 409 134 136
W3C Web Accessibility Initiative     http://www.w3.org/WAI    fax: +1 617 258 5999
Location: 21 Mitchell street FOOTSCRAY Vic 3011, Australia
(or W3C INRIA, Route des Lucioles, BP 93, 06902 Sophia Antipolis Cedex, France)

Received on Saturday, 5 January 2002 02:54:36 UTC