W3C home > Mailing lists > Public > public-webapi@w3.org > January 2008

Best practice in HTML wellformed documents

From: Diego La Monica (IWA/HWG) <d.lamonica@webprofession.com>
Date: Wed, 2 Jan 2008 15:18:19 +0100
Message-ID: <e4cd4de70801020618q546f6436xf8be5063784ee1c6@mail.gmail.com>
To: public-webapi@w3.org
Hello to all,
 in the section "1.1 Examples" the first example:

> <table id="score">
>   <thead>
>     <tr>
>       <th>Test
>       <th>Result
>   <tfoot>
>     <tr>
>       <th>Average
>       <td>82%
>   <tbody>
>     <tr>
>       <td>A
>       <td>87%
>     <tr>
>       <td>B
>       <td>78%
>     <tr>
>       <td>C
>       <td>81%
> </table>
>
>
does not produce errors in page interpretation by the browsers but it is not
correct in wellformed HTML table definition[1].
Is it not better to define the correct markup (like above)?

<table id="score">
  <thead>
    <tr>
      <th>Test</th>
      <th>Result</th>
    </tr>
  <thead>
  <tfoot>
    <tr>
      <th>Average</th>
      <td>82%</td>
    </tr>
  </tfoot>
  <tbody>
    <tr>
      <td>A</td>
      <td>87%</td>
    </tr>
    <tr>
      <td>B</td>
      <td>78%</td>
    <tr>
      <td>C</td>
      <td>81%</td>
    </tr>
  </tbody>
</table>

Cheers.
Diego La Monica

[1] "Tables n HTML documents" <
http://www.w3.org/TR/REC-html40/struct/tables.html#h-11.2.3>


--
Diego La Monica (IWA/HWG)
Web: programmazione, standards, accessibilità e 2.0
W3C Protocols and Format Working Group member for IWA/HWG
Web Skill Profiles WG Member (http://skillprofiles.eu )

email: me@diegolamonica.info - Skype: diego.la.monica
mobile +393337235382 - Web: http://diegolamonica.info - http://jastegg.it [
Le uova si sono schiuse! ]
Received on Wednesday, 2 January 2008 14:18:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:19:00 GMT