W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2000

RE: html tidy

From: Jelks Cabaniss <jelks@jelks.nu>
Date: Mon, 27 Mar 2000 15:48:29 -0500
To: <html-tidy@w3.org>
Message-ID: <NBBBICMNIPCICMKJECCBKEKODHAA.jelks@jelks.nu>
> What possible reason would you have for empty tags?  What are you trying to
> style when there is nothing to style inside the tags?

With DHTML (the DOM) you can add content.

> According to the DTD, TABLE requires TBODY, either explicitly or
> implicitly, which in turn requires at least one TR where each contains at
> least one TD or TH.  It is just not legal to have <TABLE></TABLE>, ID
> attribute or no.  (Adjust case appropriately for XML.)

With TABLE, yes.  But her example of <span id="foo"></span> is entirely legit.
You can tell Tidy to leave empty <P>s alone with the "drop-empty-paras" option,
but apparently not DIVs or SPANS.  I've previously tricked Tidy before by
changing empty SPANs and DIVs to something like <span id="foo">&nbsp;</span>.

IMO, there should be a "drop-empty-elements-with-IDs" option (though with
hopefully a shorter name :).  Or better yet, just a "drop-empty-elements"
option, period.

drop-empty-paras was too focused on one element.


/Jelks
Received on Monday, 27 March 2000 15:49:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:43 GMT