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

Re: Preventing Tidy from eating spaces

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 04 Feb 2007 12:57:59 +0100
To: Elliotte Harold <elharo@metalab.unc.edu>
Cc: Trevor Harmon <trevor@vocaro.com>, html-tidy@w3.org
Message-ID: <5bibs29fvh64kh8kq898j0vond11cbp95a@hive.bjoern.hoehrmann.de>

* Elliotte Harold wrote:
>Really. Could you elaborate? Outside of pre elements and a couple of 
>others no one ever uses any more, I don't think most browsers treat 
>white space as all that significant. Maybe in the DOM, but not in the 
>rendering. Certainly the difference between one space and no space 
>matters, but not the difference between a space and a line break or a 
>space and ten spaces.

That mostly accurate, but as you say, the white space may end up in the
DOM and scripts might depend on the amount of white space there. Also,
style sheets can be used to alter the rendering, like when using the
white-space property. And Tidy will turn

  <p>...<u> ... </u>...</p>

into

  <p>... <u>...</u> ...</p>

where the white space is no longer underlined. In almost all cases this
does not matter, but the principle is the same.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Sunday, 4 February 2007 11:58:16 GMT

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