[thelist] Which HTML (W3C validator)

Luther, Ron Ron.Luther at COMPAQ.com
Thu Mar 14 11:14:00 CST 2002

Hi Joshua,

Some days I confuse more easily than others - and this may certainly be one of those days...

* There was a recent thread noting that it was a good idea to always set the background-color for the body in your document, (and to set your browser default to a non-white color to catch those instances where you forgot).  This sounded like a good idea to me. {Even if I haven't done it yet!}

* I think you're right - it probably would have been 'more efficient' for me to just set the text color in the body declaration instead of setting separate h1 and p text colors. Especially since, at the moment, my little app always sets them to the same value.  My bad - I was probably more interested in getting the validation than in being efficient.

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

* 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.

It's been a while since I putzed around with CSS, so I'm probably a tad 'rusty'.

Wait - you said "latest CSS DTD".  What the heck is that?  Is it this?


The page says the 2.0 CSS Validator will be available for download "soon" - yet the last modified date is June 20, 1999.

Ah!  No - I'll bet it's this:

Dang - it didn't like my numbers!  I changed them to add the "#" sign in front - and it still didn't like them.

Line: 10 Context : body
Invalid number : background-colorParse Error - = "#ffffff"

Line: 12 Context : h1
Invalid number : colorParse Error - = "#7070c2"

Line: 13 Context : p
Invalid number : colorParse Error - = "#7070c2"

Any idea what's up?  I tried upper case and lower case. I tried with and without # signs. I tried with and without quotes.  I'm not sure what they are looking for.


-----Original Message-----
From: Joshua Olson [mailto:joshua at alphashop.net]

One other note.  To pass validation for the latest CSS DTD, you also may
want to add "color" for every element that defines "background-color".

For example

<style type="text/css">
  body {background-color: #000000; color: #FFFFFF; }
  div {text-align: center}
  h1 {color: #70A7C2; background-color: #000000}
  p {color: #70A7C2; background-color: #000000}

It doesn't throw an error, but I seem to remember it throwing a warning.

More information about the thelist mailing list