Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

html validation

Status
Not open for further replies.

spyderco

Programmer
Jan 23, 2005
107
US
Just ran a validation from W3 and I had 77 errors, lol.

There are a few I can't figure out though because I read from tutorials that these ARE valid attributes.

Code:
Line 37, column 34: there is no attribute "BOTTOMMARGIN"

<BODY text="#333333" bottommargin="0" vLink="white" link="#bccbdc" bgColor="#999


Line 38, column 11: there is no attribute "LEFTMARGIN"

leftMargin="0" topMargin="0" rightMargin="0">


Line 38, column 25: there is no attribute "TOPMARGIN"

leftMargin="0" topMargin="0" rightMargin="0">

? 

Line 38, column 41: there is no attribute "RIGHTMARGIN"

leftMargin="0" topMargin="0" rightMargin="0">

? 

Line 41, column 71: there is no attribute "VALIGN"

...er="0" cellspacing="0" cellpadding="0" valign="top">

I don't get how these are wrong. Can anyone help me get these so they make this validator happy?
 
What DOCTYPE are you using? The margin tags are IE only, I believe, which covers some of the errors you got. It appears that your valign is inside a <table>, not a <td>, as well.

Lee
 
You have a LOT of typos, according to w3.org, attributes that aren't relevant to tags you put them in, and the IE only ones I mentioned above. And the validator says you stuck a DOCTYPE in the middle of some of your search engine spamming text.

Lee
 
You still need a complete doctype - yours is only a partial one.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
is a complete doctype.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
You appear to have inserted a whole page within a page: There are two <HTML> tags, 2 <HEAD> tags and 2 <BODY> tags

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
Thanks. Yes, the chatterbox was printing out headers as well so I removed those and I went from 64 errors to 59, woot! lol. Which is a good improvement from the original 71 I had when I looked earlier.

Since IE IS infact a standard based on real web statistics, what way can we change the margins it works in other browsers or to the point where it won't give me errors?
 
BTW, changing my doctype to

Code:
 "[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd"[/URL]

As suggested made the entire page centered wrong and it made the CSS stop working :( So I had to change it back.
 
That just means your page was coded improperly. Since you overrely on IE anyway, I suppose it will not bother you, but the broken way you are seeing your page now is probably how people with browsers other than IE see it. I think you should stick a complete and valid doctype back up and start fixing the page. For the margins in the body. Simply use css -- valid, easier, nicer, better cross-browser support:
Code:
body {
  margin: 0;
  padding: 0;
}
 

If you can, consider moving to XHTML. It's hardly a big jump, and will force you to be a bit more consistent in the way you code your pages (all lowercase tags, for example).

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top