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

RE: Empty <div> tags

From: Charles Reitzel <creitzel@rcn.com>
Date: Fri, 13 Dec 2002 16:37:38 -0500
Message-Id: <4.3.2.7.2.20021213163119.02df0b80@pop.rcn.com>
To: Liam Quinn <liam@htmlhelp.com>
Cc: html-tidy@w3.org

Ok, I see what you mean.  Is this behavior specific to DIV or would it 
apply to other block level tags?  What about PRE, BLOCKQUOTE, CENTER?

Empty TD elements have meaning as placeholders.  However empty TDs should 
probably be handled the same way as empty Ps: insert a &nbsp;  This is my 
standard hand-coding practice to make tables w/ empty cells look OK.

At 04:06 PM 12/13/2002 -0500, Liam Quinn wrote:

>On Fri, 13 Dec 2002, Charles Reitzel wrote:
>
> > Sorry, I don't understand.  What is that difference in meaning
> > exactly?   Can you elaborate?
>
>Likely the intended meaning in this case would be for the empty div to act 
>as a separator, similar to <br>.  The couple browsers that I checked with 
>rendered
>
>   <div>foo<div></div>bar</div>
>
>as
>
>   foo
>   bar
>
>but the tidied version becomes
>
>   foobar
>
>without the separation that the author likely intended.
>
>I suppose this case doesn't come up often in practice, but I thought it
>may be worth mentioning.
>
>--
>Liam Quinn
Received on Friday, 13 December 2002 16:33:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:39:48 UTC