RE: how to use thead and tbody

At 11:14 AM 2001-09-12 , Jon Hanna wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>> I am using Tables in my page and as far as I know I have written
>> correct HTML Code, still InFocus says "thead and tbody not used
>> properly". Anybody has an exmaple page or code using thead and
>> tbody?
>
>In general:
>
><table>
>  <thead>
>    <tr>
>    ..various "header" cells, often these will be <th>
>    </tr>
>    ...more rows if necessary.
>  </thead>
>  <tbody>
>    <tr>
>    ...various "body" cells, generally these will be <td>

AG:: but not totally.  Actually, in Viral's example it is arguable that it
would be better to have the left hand column be coded as THs because that is
what you need to have in mind as context to grasp what an individual rate
quote
in the body is telling you.  But this is a) too pedantic for the assitive
technologies to have bothered with it -- they follow author usage mostly,
don't
lead it and b) is what the assistive techniques assume anyway, that the first
row and first column spell out the coordinate axes for the rest.

>    </tr>
>    ...more rows if necessary.
>  </tbody>
>  <tfoot>
>    <tr>
>    ...various "footer" cells, generally these will be <td>

AG:: au contraire, TFOOT was invented for bottom margin headers to stay on
screen as the body data is scrolled.  So if you have a TFOOT it probably
contains things that should be classed as THs.

Google for "THEAD TFOOT" there is a page talking about scrolling that comes
up.

>    </tr>
>    ...more rows if necessary.
>  </tfoot>
></table>
>
>Where any of those three can be absent and there can be more than one
>tbody.
>
>When thead, tbody and tfoot were introduced (I think with HTML3.2) it
>was decided that <tbody> should be assumed, so:
>
><table><tr><td>data</td></tr></table>
>should be considered the same as:
><table><tbody><tr><td>data</td></tr></tbody></table>
>
>In other words your table has a tbody element even though there is no
>tbody tag.
>
>With XHTML1.0 there had to be a choice with elements for which the
>tag could be left out to either enforce their presence (as was done
>with <html>, <head> and <body> which strictly speaking could be left
>out before), or to allow them in the DTD. (leaving out <tbody> is now
>allowed by that spec).
>However it is still considered better to include the element at all
>times.
>
>-----BEGIN PGP SIGNATURE-----
>Version: PGPfreeware 6.5.3 for non-commercial use
<<http://www.pgp.com%3E%3E%3Eiqa/>http://www.pgp.com>
>
>iQA/AwUBO59734Fpv9f1Mr0YEQK67gCgqz/ozdIr/s50CORfEtkO05QJ2zkAn1Zr
>lNO9Gk/dWZ2vSKrMaaDKT6SY
>=Ihyh
>-----END PGP SIGNATURE-----
>  

Received on Wednesday, 12 September 2001 11:35:22 UTC