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: Kenneth Kin Lum <kenneth.kin.lum@gmail.com>
Date: Sun, 30 Mar 2008 12:57:48 -0700
Message-ID: <d8b3b8e80803301257p372382c4sd03527689fc4fae8@mail.gmail.com>
To: "Anne van Kesteren" <annevk@opera.com>
Cc: public-html-comments@w3.org
On Sun, Mar 30, 2008 at 9:51 AM, Anne van Kesteren <annevk@opera.com> wrote:

> On Sun, 30 Mar 2008 09:30:37 -0700, Kenneth Kin Lum
> <kenneth.kin.lum@gmail.com> wrote:
> > How about without using pre, is there a way that you could intentionally
> > or accidentally expose the spaces by defining user defined styles?
>
> I already answered this question, no?


What I mean is without using "white-space:pre" but something else.

It does feel a little different from the idea that HTML is the "content" and
CSS is the "presentation", because if CSS decides whether the white spaces
that an author put in the HTML file get rendered or not, then it seems like
the CSS is deciding on what the content is too, as whitespace characters can
also be considered part of the content.


>
> > So as far as HTML is concerned, it takes all things, including spaces,
> > and put them in the DOM tree, and that's done?
>
> More or less, yes. You'd have to read the parsing algorithm in HTML5 to
> get the exact details.


I think one thing is that in the HTML 4.01 spec, it seem to hint at how
white space can be processed, such as collapsing the white spaces or how it
is handled in different languages.  So it may lead to readers thinking that
white space is first processed in the HTML layer to decide
whether whitespaces get stored in the parsed result, even before the CSS
layer can touch it.   Could the HTML spec state that white space processing
is not done at all in the HTML layer, that all white spaces is retained in
the parsed result (in the DOM tree?).

Many thanks for hearing my amateur ideas.
Received on Sunday, 30 March 2008 19:58:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 00:13:58 GMT