Re: table and form

On Wed, 27 Sep 2000, Baptiste DU wrote:

> here is the problem i 'm facing: when i use TIDY on an HTML page
> which contains a tag <table> and inside this tag i have a form
> <form>, TIDY creates another tag <table> just after the tag
> <form>
> 
> to be more explicit:
> the code before TIDY:
> <table>
>  <tr>
>  <td>...</td>
>  <form   ...>
>  <td>...</td>
>  </form>
>  <td>...</td>
>  </tr>
>  </table>

The table element contains table rows, table rows contain table
cells, and table cells can contain form and other elements.

Rather than:

>  <form   ...>
>  <td>...</td>
>  </form>

you would be better off with:

>  <td><form>...</form></td>

There are a variety of ways in which form tags can be abused
with tables, and Tidy uses some rules of thumb to do its best
to fix things up.

 a) move the form within the table cell
 b) move the form to enclose the table
 c) protest and ask the user to fix things

This is made harder still since the author could place the form
tag as direct child of the table, or a table row, or even table
head, table body or table foot elements.

I will look into refining the rules for this.

Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
tel/fax: +44 122 578 3011 (or 2521) +44 778 532 0444 (mobile)
World Wide Web Consortium (on assignment from HP Labs)

Received on Monday, 2 October 2000 05:02:35 UTC