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

On Sat, 29 Mar 2008 12:37:52 -0700, Kenneth Kin Lum  
<kenneth.kin.lum@gmail.com> wrote:
> I have tested the following in IE 7.0.6001.18000, Firefox 2.0.0.13,  
> Safari
> 3.1, and Opera 9.26
>
> <div>hello world</div>
>
> <div> hello world </div>
>
> <div><span> hello world </span></div>
>
> <div><span>
>        hello world
> </span></div>
>
> The final rendering in all the modern browsers are the same.

That's because defines them to be the same. This has nothing to do with  
HTML. HTML just impacts the DOM. If you look through the DOM you'll see  
that in most user agents (IE has some issues there) the whitespace will be  
there. You can make this visible on screen by setting white-space:pre or  
equivalent on the element in question.


> [...]



-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Sunday, 30 March 2008 15:49:13 UTC