W3C home > Mailing lists > Public > public-html-comments@w3.org > March 2008

Re: HTML 4.01 and 5.0: is it somewhat "unspecific" about space characters

From: Daniel Beardsmore <resident@telcontar.net>
Date: Sun, 30 Mar 2008 17:33:10 +0100
Message-ID: <47EFC0C6.8040701@telcontar.net>
To: public-html-comments@w3.org

Anne van Kesteren wrote:
> On Sun, 30 Mar 2008 09:09:33 -0700, Kenneth Kin Lum  
> <kenneth.kin.lum@gmail.com> wrote:
>> hm... so you mean HTML take all spaces to be the content... and then...  
>> it is CSS that decides to drop them?
> CSS can't change content. They're just not rendered by default based on  
> the white-space property value.

My favourite is this one:

   <li><a href...>Foo</li>
   <li><a href...>Bar</li>
   <li><a href...>Baz</li>

Now, there's no way to get the list items to butt up against each other. For
example, if you intend for this:

  [ Foo ][ Bar ][ Baz ]

The white space will give:

  [ Foo ] [ Bar ] [ Baz ]

Although all white space between <li>s will normally be dropped, if you set
li { display: inline } to get them in a horizontal line, now you'll get
exactly one space between each. The spaces between </li> and <li> will
collapse to a single, visible space.
Received on Sunday, 30 March 2008 16:35:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:24 UTC