W3C home > Mailing lists > Public > www-html@w3.org > April 2004

Re: HTML 4.01 DTD

From: ic <ic@rimantas.com>
Date: Fri, 16 Apr 2004 09:11:32 -0000
To: www-html@w3.org
Message-Id: <20040416091132.CE91436B3A@mail01.powweb.com>

>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.
>Also what is this about the "- O", "O O" and "- -"? What does that mean?

That's the key - it is about are start and end tags optional (O) or required (-).
So we see that both tags for TBODY are optional. Hence you still have TBODY in your table without writing it in code.

Regards,
Rimantas
                                                                              
                                                                              
                                                                               
                                                                            

                
                                                                 
Received on Friday, 16 April 2004 05:11:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:00 GMT