| 12:33 pm on Jul 5, 2003 (gmt 0)|
I use a remote service to gather statistics, and the HTML code they originally gave me was:
That did not validate with transitional, so I added type=... to get:
which validates fine in transitional but fails in strict.
The obvious solution is to go one step further and remove the offending language attribute. What worries me slightly is that the htmlhelp site says:
I suspect that much of htmlhelp is a little old, and I believe that I can safely discount that warning. The discussions on validating the Google AdSense code did not include any warnings about problems with browsers.
Still, I would be a lot happier if someone would confirm that most current browsers will work fine without the language attribute. If I fail to count five percent of my users it will be no big tragedy.
| 2:57 pm on Jul 5, 2003 (gmt 0)|
also try addign a </script> afterwards.
Sometimes validation is NOT everything, I'm afraid...
| 7:02 pm on Jul 5, 2003 (gmt 0)|
Most browsers seem to do just fine without EITHER attribute, although this is not valid HTML. I stopped using the language attribute two years ago, and have seen zero report of trouble.
Even though, according to the W3C, there is no standard default scripting engine for HTML, Microsoft's developer's site [msdn.microsoft.com] says:
|In Internet Explorer, the default scripting engine is JScript. |
Also, here's a W3C Reference [w3.org] which offers a few extra insurance steps you can take:
In the absence of a META declaration, the default can be set by a "Content-Script-Type" HTTP header. Content-Script-Type: type ...where "type" is again a content type naming the scripting language.