E-mail List Archives

RE: Can I use TDs with IDs and headers, instead of TH


From: Jukka K. Korpela
Date: Mar 13, 2003 3:56PM

On Thu, 13 Mar 2003, Rachel wrote:

> Are you saying that the spec says you shouldn't use
> scope attribute with TDs?

I'm as puzzled as probably many other people by the observation that the
HTML specification says that the scope attribute "specifies the set of
data cells for which the current header cell provides", thereby implying
that it is attached to a header cell.

Maybe we should read that liberally, in the light of the statement "TH is
for headers, TD for data, but for cells acting as both use TD". We could
interpret that a TD element can thus be a header cell, too.

But I'm not happy with this approach, since it makes the roles of TH and
TD more obscure. The specification also says: "Table cells may contain two
types of information: header information and data. This distinction
enables user agents to render header and data cells distinctly, even in
the absence of style sheets. For example, visual user agents may present
header cell text with a bold font. Speech synthesizers may render header
information with a distinct voice inflection." This becomes less useful if
we cannot know whether a TD element actually contains header information.

> Is it OK to mix the use of scope and ID/Headers in one
> data table?

Why not? Of course we need to make them give consistent information then.

> (Jukka I understand your point that it's best to avoid
> the use of headers altogether, but sometimes it's
> unavoidable).

Yes, but it's much easier to make authors use scope attributes than
headers and id attributes. What bothers me is that these two ways are so
often presented without making it clear that the scope method is to be
preferred and that it is suitable for most cases. I think the main reason
is some old software that supports (or supported) the headers and id
method only.

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/