[thelist] Which HTML (W3C validator)

Joshua Olson joshua at alphashop.net
Thu Mar 14 12:23:01 CST 2002


----- Original Message -----
From: "Luther, Ron" <Ron.Luther at COMPAQ.com>
Subject: RE: [thelist] Which HTML (W3C validator)


> * Hmmm - that's off - I didn't get any warnings for the little bit of css
I had in that file.

I tried the following validator:

http://jigsaw.w3.org/css-validator/validator-uri.html

Against this code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <style type="text/css">
      body {background-color: #000000;}
      div {text-align: center;}
      h1 {color: #70A7C2;}
      p {color: #70A7C2;}
    </style>

    <title>Test</title>
  </head>
  <body>
    blah
  </body>
</html>

And the warnings I get are:

Line : 13 Level : 1 You have no color with your background-color : body
Line : 15 Level : 1 You have no background-color with your color : h1
Line : 16 Level : 1 You have no background-color with your color : p

> * I may just be having a fuzzy morning - but I'm not seeing the point to
adding background-color to elements that *should* "inherit" that property
from the body container.  However, it might to worthwhile if I wanted to
give the user control over 'fiddling' with those bits - or had a future need
to adjust them.

I think you are correct, cascading is what is supposed to happen.  However,
the validator does offer warnings when you do not put both color and
background-color in a single element.

-joshua






More information about the thelist mailing list