W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2000

Re: table and form

From: Dave Raggett <dsr@w3.org>
Date: Mon, 2 Oct 2000 10:02:22 +0100 (GMT Daylight Time)
To: Baptiste DU <bdu@cosmosbay.com>
cc: html-tidy@w3.org
Message-ID: <Pine.WNT.4.10.10010020838030.-396779@hazel.hpl.hp.com>
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.


-- 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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:48 UTC