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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

w3c validation

Status
Not open for further replies.

iluvperl

Programmer
Jan 22, 2006
107
Hi guys. Not too savvy with web design (programmer though) and created one with Photoshop CS2/Image Ready.

Second template ever and it's pretty simple. It only came up with 6 errors on the W3C validation.

Can someone help me sort these out? I want to be totally compliant.

My URL is The W3C url is
Code:
1. Line 1 column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>".
<html>

2. Line 62 column 35: there is no attribute "LEFTMARGIN".
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheigh

3. Line 62 column 49: there is no attribute "TOPMARGIN".
...r="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onl

4. Error Line 62 column 65: there is no attribute "MARGINWIDTH".
...margin="0" topmargin="0" marginwidth="0" marginheight="0" onload="preloadImag

5. Error Line 62 column 82: there is no attribute "MARGINHEIGHT".
...gin="0" marginwidth="0" marginheight="0" onload="preloadImages();">

6. Error Line 64 column 40: there is no attribute "HEIGHT".
<table id="Table_01" width="801" height="601" border="0" cellpadding="0" cellspa

Thanks for your help everyone.
 
Okay guys, from google I was able to fix all but one of them.

Can someone explain why HEIGHT isn't working here?

Code:
Line 79 column 26: there is no attribute "HEIGHT".
<table width="801" height="601" border="0" cellpadding="0" cellspacing="0" align
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead). 

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information. 

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.
 
Because table element does not support the height attribute. You're trying to impose an attribute that cannot be there hence the answer:
there is no attribute "HEIGHT".

So, get rid of the height and you're there. You can use css to define the height.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top