Forum Moderators: phranque

Message Too Old, No Replies

Problems with HTML validation..what now?!

Problems with HTML validation..what now?!

         

PumpkinHead

8:34 pm on May 17, 2004 (gmt 0)

10+ Year Member



Ok after spending loads of time creating a site I have just tried validating the page but get loads of errors.

E.g

<table width="800" height="600" border="0" align="center">
Line 25, column 26: there is no attribute "HEIGHT"

According to the W3C validation tool, it says I should get around this by designing the site using CSS (I already use CSS for fonts/links but not layout).

Should I keep the existing invalid code and carry on or stop and learn CSS (I've tried already!)

Any ideas/thoughts? Thanks ppl

crashomon

8:56 pm on May 17, 2004 (gmt 0)

10+ Year Member



Leave height off, unless you need to have the height set.

In that case, you can try this: Set up a column on the side that runs the length of the table and insert a 600px shim (transparent image)

I'm sure others have more ideas . . . .

Patrick Elward

isitreal

10:04 pm on May 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If validation is more important to you than backward compatibility, just assign an id to the td and table, then use the css height:****px or ****% and you'll be fine, it will work on all modern browsers. Remove the height attribute from td and table, it will validate fine then.

Same goes for <body margin=.....> just set:

body, html {
margin:0;
padding:0;
}
and you're on your way to a validating page. If you stick to html 4.01 transitional you'll be able to retain almost all your html with very few changes and still have a clean validating document.

img tags are usually the hardest site wide, since often they didn't have alt= something attributes, but all you need is alt="" and it does the job.

PumpkinHead

11:07 am on May 31, 2004 (gmt 0)

10+ Year Member



Hi again,

Only problem with doing this is that the table I had is no longer in the centre. Am I doing something wrong?