Forum Moderators: open
Im new to these forums just signed up today, but I have always been checking them, now I am a member.
Okay, I understand that there has been quite a couple of posts regarding Validation, sorry if this is a repeat but im totally going off the head with this problem. Here it is this is my main index page, from report after running it through the W3C Validator.
Line 62, column 82: there is no attribute "LEFTMARGIN"
..."#FFFFFF" alink="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" margin
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.
✉
Line 62, column 96: there is no attribute "TOPMARGIN"
...k="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onL
✉
Line 62, column 112: there is no attribute "MARGINWIDTH"
...margin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadI
✉
Line 62, column 129: there is no attribute "MARGINHEIGHT"
...gin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('Buttons/Hi
✉
Line 65, column 76: there is no attribute "BORDERCOLOR"
...lpadding="0" cellspacing="0" bordercolor="#6EA154" bgcolor="#305774">
✉
Line 100, column 66: there is no attribute "BORDERCOLOR"
... width="150" height="160" valign="top" bordercolor="#6EA154" bgcolor="#305774">
✉
Sorry for such a long thread, but If anyone can point me in the right direction as of how to fix this, I can fix all of my pages, becuase they are templates created from the orignal page.
It sounds like you're using a XHTML DTD (a DTD is that first line of your HTML that looks similar to
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> This tells the browser how to interpret your HTML. If you're using an XHTML DTD like the one above, the leftmargin, etc. attributes are deprecated, meaning they no longer are used in XHTML. They should be replaced with CSS parameters in the head of your code or in an external file.
So you could either replace them with CSS, or choose a different DTD (such as
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> which still allows the use of those attributes. Does that help?
To get zero margins on the body element, you need to use the following CSS in your stylesheet:
body {
margin:0;
padding:0;
} or as inline CSS:
<body style="margin:0;padding:0;">
For the quick reply guys.
I have bookmarked W3School thx, also I have used the following doc types :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
This one gives the same errors
And This one :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Creates more errors :(
Also im using dreamweaver 4 mx for my design, I really didnt think it would be this difficult putting a website together.
I have my domain name and host registered. But can not upload my site yet untill its corrected. But it seems that im running into problem after problem.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
That's the best one for starters. The strict one you can move to later if you choose to, but you don't need it for now.
Are the only errors you have the ones you have mentioned? Bear in mind that the topmargin, leftmargin, etc. do work, even if they are invalid. If you need to get the site online, you can do so without a problem, and then you can make the final adjustments later.
Yes the errors that is listed on my first post are the only ones. The Validation process seems to be the only thing slowing me down at the moment.
I dont have any probs, with anything else as such, hmmmm well maybe I do but thats another story he he he.
My site is more or less completed, I just need to finish a couple of more graphical images, but thats a breeze, also uploading, protecting folders, awstats, php, cgi and that kind of stuff, im fairly okay with.
It seems that the simple HTML basics have me puzzeled lol partially becuase im depending on dreamweaver to much.
I know many Web designers sites that fail validation (even those in the top ten position of Google for competitive keywords - 3/10 validated to choosen Doctype, 2/10 had no Doctype specified and the rest - 5/10 - had errors).
I am slowly coming to the conclusion that although standardisation is important (to stop us going back to the Netscape 4.xx nightmare) it is actually the browsers that need to support standardisation and not the Web designers - Political correctness reigns supreme in this field.
Validation will not stop your Web page ranking well and will not stop it displaying correctly (as the above - very bad study - shows) in most browsers - so there is no problem unless you sell the service as a professional or worried about the WAI giudeline laws for accessability (but that could potentially be argued as irrelevant to Doctypes anyway).
OK - rant over.
Yes the errors that is listed on my first post are the only ones. The Validation process seems to be the only thing slowing me down at the moment.
OK, then put it on the "fix later" list. Those particular errors are not critical: unknown attributes are no big problem, it is stuff like missing end tags and improper nesting which is much more important.
it is actually the browsers that need to support standardisation and not the Web designers
It is not in IE's commercial interest to encourage platform independent coding.
It is in every website owners interest (commercial or otherwise) that their website works on every platform going.
Hence many web designers will continue to support standardisation and MS will continue to do things differently.
I was surprised and impressed to see the W3C symbol on a commercial website yesterday. Evidently word is getting out that platform independent code is a mark of quality design.
I am going to leave this validation project on hold, and carry on with getting my folder structures uploaded on to my host server ready for upload.
My site wont be going live for another while yet, also with the validation, I did manage to learn about accessibility standards, by including a summary for my layout tables.
PS Thx for the help and usefull info about css.