- From: Robert van Loenhout <r.vanloenhout@greenvalley.nl>
- Date: Fri, 16 Apr 2004 11:03:35 +0200
- To: <www-html@w3.org>
Hi,
I was looking at the HTML 4.01 DTD at http://www.w3.org/TR/html4/strict.dtd
to look at the table definition.
<!ELEMENT TABLE - -
(CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
<!ELEMENT CAPTION - - (%inline;)* -- table caption -->
<!ELEMENT THEAD - O (TR)+ -- table header -->
<!ELEMENT TFOOT - O (TR)+ -- table footer -->
<!ELEMENT TBODY O O (TR)+ -- table body -->
<!ELEMENT COLGROUP - O (COL)* -- table column group -->
<!ELEMENT COL - O EMPTY -- table column -->
<!ELEMENT TR - O (TH|TD)+ -- table row -->
<!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data
cell-->
This definition seems to me that a TR tag is not allowed to be a direct
child of
a TABLE tag. This surprised me... Also because when I validate a 4.01
document
with the w3c validator it says it is valid.
Could someone explain this?
Also what is this about the "- O", "O O" and "- -"? What does that mean?
When I write my own DTD I am not allowed to write comments with --
comment --
yet W3C uses it everywhere.
Thanks for any help.
Received on Friday, 16 April 2004 05:05:49 UTC