W3C home > Mailing lists > Public > www-style@w3.org > October 2001

Re: How is it possible to devise such a feeble system?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 24 Oct 2001 14:22:37 -0400
Message-Id: <200110241822.OAA09719@m2-032-6.mit.edu>
To: "Peter Foti (PeterF)" <PeterF@SystolicNetworks.com>
cc: "'Chris Casciano'" <10sball@placenamehere.com>, "'www-style@w3.org'" <www-style@w3.org>
> If that was the case, then if I was to apply a style to the body
> element, and give it a background color, then I would only see the
> background color on some of the page (for small documents), correct?

For XML (assuming you have a non-XHTML flavor of XML that has a <body>
tag, yes.  For HTML as special case is made at

  For HTML documents, however, we recommend that authors specify the
  background for the BODY element rather than the HTML element. User
  agents should observe the following precedence rules to fill in the
  background: if the value of the 'background' property for the HTML
  element is different from 'transparent' then use it, else use the value
  of the 'background' property for the BODY element. If the resulting
  value is 'transparent', the rendering is undefined.

This is basically an ugly hack to handle the fact that in HTML
background always got set on <body> and that people expect the behavior
you describe....

> The body takes up the entire viewport (by default).

Try applying a border to <body> to see that this is not always the case.

Computer, n: 
   A device to speed up and automate errors
Received on Wednesday, 24 October 2001 14:22:44 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:59 UTC