Re: Empty <div> tags

At 06:35 AM 12/17/2002 +0100, Bjoern Hoehrmann wrote:

>* Charles Reitzel wrote:
> >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.
>
>Empty <p> elements get dropped, empty <td>s should stay empty <td>s.
>Inserting &nbsp;s is considered rather harmful.

Interesting.  I have never heard this before.  Can you elaborate?  What are 
the side effects?

When generating HTML from web apps (Perl/JSP), I have always found it 
necessary to make sure all cells have something in them, either via rowspan 
or by adding &nbsp;.  If you leave them empty, you get visual "holes" 
through the table to the background.  If any styles are applied to the 
table, it looks weird.  To see an example, have a look at the table for 
binaries on the Tidy home page.  Admittedly, this is just a hack I have 
picked up and not based on any deeper theory.

curious,
Charlie

Received on Tuesday, 17 December 2002 11:37:36 UTC