HTML 4.01 Transitional

liunx

Guest
Alright, I'm confused.<br />
<br />
I put up a link to my site in one of the other forums here, and someone by the name of giz was nice enough to show me that i could put my code into a validator.<br />
<br />
Now, i have done this, and the results of the opening page are here (<!-- m --><a class="postlink" href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.massacreindisguise.net&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=">http://validator.w3.org/check?uri=http% ... lly%29&ss=</a><!-- m -->).<br />
<br />
if it helps, that page on my website is here (<!-- m --><a class="postlink" href="http://www.massacreindisguise.net/">http://www.massacreindisguise.net/</a><!-- m -->).<br />
<br />
what i'm trying to do is get rid of this message, which it keeps giving me on the validator:<br />
<br />
Sorry, this document does not validate as HTML 4.01 Transitional.<br />
<br />
any help would be greatly appreciated.<!--content-->i think that it is cause you use CSS.<!--content-->ok, a validator checks your html code to make sure it will display on all browsers correctly. If you have an IFrame on the page it will generate an error as these are IE only (maybe NN7 though), in fact anything that does not work cross browser will cause toys to be thrown from the pram. A validator should only be used once, to check that the site is complient. to be honest, not many sites are 100% complient across the board, and if they are a lot of effort has gone into utilising javascript to load different options depending on the browser viewing the page. CSS will not cause an error though as it is part of HTML 4.0 and above.<br />
<br />
If the site works on NN4+ and IE4+ then dont worry as hardly anyone will have a version lower than that. or if they do, they should not.<!--content-->You don't need to do any more work if you are happy with the way the page looks and works in your browser.<br />
<br />
<br />
There are many "versions" of HTML out there. There are the "official" ones by W3C, and then there are the realities of how Netscape, Internet Explorer, and all of the others have actually been designed.<br />
<br />
<br />
In all browsers and versions you need to write well formed code. That is, tags should be properly nested, among many things. For example, code should look like: <p><b><i>blarg</i></b></p> and not some other order like: <p><b><i>blarg</b></p></i>. The latter example isn't nested properly and may not work in some browsers.<br />
<br />
<br />
Now, once you have written a website, how do you test your code for errors?<br />
<br />
<br />
One way is just to look at it in a Browser; but you are unlikely to have Netscape 4, 5, 6 and 7, as well as Mozilla, and Internet Explorer 4, 5 and 6, and Opera, Phoenix, and Konquerer all available to you. So you can't easily test it in everything. Even if it looks allright there may be errors in there that stop it working in some other version.<br />
<br />
<br />
The other way is to use a Validator. This can look at your code in detail and tell you about problems. You have to tell it what version of HTML you are using. It is programmed to recognise the HTML 2, HTML 3.2 and HTML 4.01 versions from the W3C. Unfortunately it doesn't know about some of the extra codes that Netscape and Internet Explorer can use in their browsers, like <BLINK> and <MARQUEE> so will tell you these are "errors" if you have used these in your webpage. At the moment there are no browsers that exactly match the W3C standards but some of the newest browsers are very close.<br />
<br />
<br />
So, what you do is use the Validator to list the 'silly errors' in your code: like <TBALE> instead of <TABLE>, show you wrongly nested tags, or tags where you missed out the closing element like <P><B>Blarg</P> which is missing a closing </B>, and other such easily-fixed errors.<br />
<br />
<br />
Because the validator is working to one particular version of HTML, it will give an error message similar to:<br />
Error: there is no attribute "foo" for this element (in this HTML version)<br />
when it comes across something that it doesn't understand, like the <BLINK> tag or the MARGINWIDTH or MARGINHEIGHT attribute.<br />
<br />
<br />
If you are happy that the entry is spelt correctly and is just a particular Netscape or Internet Explorer proprietory HTML extension then you can totally ignore the error message. Look carefully though, because the error might be genuine. I saw a page with something like: <IMG WEIGHT="100" HEIGT="100" SRC=http://www.htmlforums.com/archive/index.php/"foo.png"> the other day. Look carefully, HEIGHT has been spelt wrong, and that WEIGHT.. that should be WIDTH. It looks like the author spelt HEIGHT as WEIGHT then got confused or was in a hurry and not watching what they typed. Of course those errors need correcting, and they may not have been spotted at all without the use of a validator.<br />
<br />
<br />
For tags that are not part of the HTML 4.01 standard, you can ignore the error messages. When you have a lot of experience with HTML you might find another, or a better way, of achieving the same effect without an error message. That isn't important now. What is important, and what you have already achieved, is the removal of real mistakes in the structure and logic of the HTML code; mistakes that would confuse some browsers.<br />
<br />
<br />
What you are left with is a couple of instructions that some browsers will accept and others will ignore. They won't crash or scramble the document. In some browsers that instruction will just be ignored: The instruction <BLINK>Flashing Text</BLINK> will give Flashing Text in Internet Explorer but it will not flash in Netscape. The MARGIN instructions you have used also fall into this category; they are ignored in some browsers.<br />
<br />
<br />
For most people, the position that you have got to now is more then good enough. Time to upload that webpage and call it fixed. Don't forget to go through and send each page of the web site off to the Validator and remove all the typos and nesting errors from all of those as well.<br />
<br />
<br />
If you really want to persue getting rid of these error messages, then it begins to involve using CSS, adding instructions which detect which version of Browser your visitor is using (because not all browsers do CSS the same), and serving different bits of code that each particular version of browser will understand. There is no real need to go down this route unless you want absolute perfection. The last 1% of fixing will take a further 90% of your time.<br />
<br />
<br />
At the position you have reached, your code is already in better shape that 99.9% of all the other web sites in existence.<br />
<br />
There is more about this in the threads at: <!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=18300">http://www.htmlforums.com/showthread.ph ... adid=18300</a><!-- m --> and at: <!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=17453&pagenumber=1">http://www.htmlforums.com/showthread.ph ... genumber=1</a><!-- m -->. you very much. you've been very helpful.<!--content-->The validation page shows 2 errors.<br />
<br />
For the background one, try replacing the BACKGROUND property with this...<br />
<br />
STYLE="background-image: url(backgrounds\vanback.jpg);"<br />
<br />
For the height one, try taking out the HEIGHT property and see if you layout still works ok.<!--content-->
 
Back
Top