W3C home > Mailing lists > Public > www-validator@w3.org > July 2002

HTML 4.01 strict validates TABLE that does not contain TBODY element

From: Derek Read <Derek.Read@corel.com>
Date: Mon, 15 Jul 2002 17:45:13 -0400 (EDT)
Message-ID: <2563EFDB68120F48B9F511B7957504360208C12C@OTT-VSVR2.corelcorp.corel.ics>
To: <www-validator@w3.org>




HTML validator (validator.w3.org) declares the following markup fragment
as correct (when included as part of an otherwise complete and valid
HTML file):

<TABLE>
 <TR>
  <TD>some text</TD>
 </TR>
</TABLE>

Clearly this is incorrect, as the definition for the TABLE element is as
follows
(see  http://www.w3.org/TR/html4/strict.dtd  AND
http://www.w3.org/TR/html401/strict.dtd):

<!ELEMENT TABLE - -
     (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>

The element TR is not mentioned in this definition.
The element TBODY must appear one or more times (all other elements are
optional).
TR is in fact defined later in the DTD.

Therefore, in order to be valid my table must be written as follows:

<TABLE>
 <TBODY>
  <TR>
   <TD>some text</TD>
  </TR>
 </TBODY>
</TABLE>

Have I missed something?

Sincerely,

Derek Read
Support Technician - XMetaL
Corel Corporation (formerly SoftQuad Software)
Received on Monday, 15 July 2002 18:56:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:03 GMT