HTML 4.01 uses different rules for validating. It is also more lenient on certain tags. XHTML 1.0 strict requires that your code uses pure XML for the most part. So, your tags must use correct parameters.
You can view the corrected code here: hXXp://www.rexibit.com/development/Untitled-1.htm (just replace the XX with tt). I don't want that page getting indexed lol.
Another thing to note is that you don't need to declare a "Var" in the beginning of a for statement since it is declared by the nature of the loop.
ah thanks rexibit
the reason i used that 2-line doctype is from
I generally put all my scripts in an external file, but that is what I do if they are on the page itself.
The script element type has very different content models in HTML4 and XHTML1, and that's what's causing this problem.
In HTML, the content model is CDATA, which is parsed with very special rules. Character entity references are not parsed, and the first occurrence of '</' (followed by a name start character) terminates the script element.
In XHTML, the content model is (#PCDATA). Entity references are parsed, '<' is recognised as a TAGO delimiter, etc.
In XHTML you should write i < 10 in your script code, but that won't work if you use pretend-XHTML since that is really HTML, which means the entity reference won't be parsed.
Birnam wood is come to Dunsinane
Be kind, use code separation...
Whatever you can do or dream you can, begin it.
Boldness has genius, power and magic in it. Begin it now.
Chroniclemaster1, Founder of Earth Chronicle
A Growing History of our Planet, by our Planet, for our Planet.
thanks for all your help. yes I think if possible and if it is for production website, then I will use external js files. it can speed up the loading of the page... and i think some performance book says it is best to put the link at the end, so that the content gets displayed first (and thus faster display). usually as an example, i like to put everything (html, js, css) in one file so that we can look at it and cross reference the all in one file.