HTML 4.01 Valid?

mjs416's picture

They have: 127 posts

Joined: Dec 2003

OK, so I get done with a site and run it thru the w3 html validator. I had to employ some background images for some od the td's. I have a single invalid piece of code pertaining to the background.

My question is, Is there an alternative to using a background image in a cell, yet still get the same effect and gain HTML 4.01 validity?

Busy's picture

He has: 6,151 posts

Joined: May 2001

use CSS
put something like
.tdbg {background-image: url("image.gif");
in your style sheet or add style tags around it and place at top of page, then in td cell just put
...

CSS and HTML/XHTML are different things, bad CSS wont stop HTML from validating, unless your missing quotes etc, same as validating CSS, bad HTML wont effect it even if included in the page.

He has: 1,380 posts

Joined: Feb 2002

Quick question...

If you are validating...why are you validating to HTML 4.01 instead of xHTML? They aren't that different, and if you're gonna put in the effort, you might as well code "for the future"

xHTML

mjs416's picture

They have: 127 posts

Joined: Dec 2003

Eskater05 wrote: Quick question...

If you are validating...why are you validating to HTML 4.01 instead of xHTML? They aren't that different, and if you're gonna put in the effort, you might as well code "for the future"

xHTML

Screw that. I tried to validate with XHTML 1.0 and got several dozen more errors. I'd rather deal with 1 issue then 50 issues. Thanks anyways though.

He has: 1,380 posts

Joined: Feb 2002

Ok...

Just a note: sometimes 50 errors can be like 12 that all, um, cascade...lol. Seriously though, you should check out the docs on xHTML...the major differences are that all positioning and styling are in CSS, you have to add an xml declaration at the top of the page, and tags like and turn into

They have: 461 posts

Joined: Jul 2003

hell. i have mine validate in html 4.01 since that's the dominant and i'm not sure m$ie was made to understand xhtml. however, the metas are the only thing not done in an xhtml style (< /> instead of < >)

when i validate for xhtml 1.0 loose, most of mine validate with the meta restrictions the few that dont... they ALWAYS have cascade issues. meaning they have like 200 errors and when you look it all comes down to about 5 lines and you fix them and remove all 200 errors. most of the time i take the time to do that

POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.