[html5] White space where HTML4 ignored it

A personal comment on http://www.w3.org/TR/2011/WD-html5-20110525/

In several places, HTML4 (or rather SGML) automatically ignores white 
space in the source, so that you can lay out the source more freely. 
E.g., this document has not a single white space character: 

<!doctype html public '-//W3C//DTD HTML 4.01//EN'>
<html>
  <head>
    <title>Test</title>

   <body>

    <table>
    <tr>
      <td>one</td>
      <td>two</td>
    </table>

HTML5, on the other hand, sees lots of spaces and line feeds in this 
document. People will want to lay out the document like this anyway, and 
the result is that the white space has to be removed at some other stage 
in the processing. 

In anticipation of HTML5, CSS already added some rules to ignore spaces 
that are likely to be not significant, but as CSS has no access to the 
mark-up, those rules are necessarily wrong in some cases. (E.g., CSS 
will now ignore certain spaces even if they had been marked-up as 
character entities: clearly not the author's intention.)

If the document is processed by some other system than CSS, that system, 
too, will need to deal with white space that may not have been 
significant. 

It would be better if HTML5 remained backwards compatible with HTML4 in 
this case, ignoring non-significant white space in all places where 
HTML4 ignores it, too.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Monday, 8 August 2011 19:00:21 UTC