[html5] Remove me from your email list. Thank you

embracingevents@aol.com embracingevents at aol.com
Wed Apr 6 11:28:58 PDT 2011



Sent from my HTC on the Now Network from Sprint!

----- Reply message -----
From: "Jukka K. Korpela" <jukka.k.korpela at kolumbus.fi>
Date: Tue, Apr 5, 2011 3:51 am
Subject: [html5] td and th
To: <help at lists.whatwg.org>

Luis-Miguel Rodríguez Rojas wrote:

> Why does the <th> element [...] have a Phrasing content model [...]
> whilst the <td>element [...] have a Flow content model [...]?

I had not noticed this change (from HTML 4.01 and its predecessors), but I 
think it is rather natural on semantic grounds. A table header cell contains 
header information for a column or a row, and header-like elements are 
generally just text and text-level markup (cf. to <h1> and <caption>, for 
example). A data cell may contain just about anything, such as text 
paragraphs, lists, or inner tables, even in a table that represents tabular 
data (which is a much wider concept than "numeric table").

Thus, the stricter content model probably helps to detect accidental use of 
<th> where <td> should be used, as well as markup based on misunderstanding 
of HTML semantics - assuming, of course, that the author uses suitable 
software to check the markup.

The only potential objection that I can imagine for now is that a table 
header might reasonably act as a tool for sorting or otherwise modifying the 
data in the table or its rendering. Typically this means just making the 
header content a link so that e.g. clicking on a particular column header 
sorts the table so that the column appears in alphabetic or numeric order, 
and this can be arranged using just text-level markup there (whether we use 
client-side, server-side, or combined implementation of the operation). But 
would it be possible that someone reasonably wanted to use a _form_ in a 
table header cell? I mean a form where the user selects a sorting criterion, 
for example. Perhaps in the simplest case, the form might consist of a 
<select> element and (at least when scripting is disabled) a submit button - 
but to make it work robustly, with a server-side backup, it would need to be 
a <form>.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

_______________________________________________
Help mailing list
Help at lists.whatwg.org
http://lists.whatwg.org/listinfo.cgi/help-whatwg.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20110406/c1d7ad78/attachment-0001.htm>


More information about the Help mailing list