Forum Moderators: open
I selected this option and it still doesn't validate.
This is the code:
<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
<!--
var sc_project=######;
var sc_invisible=1;
var sc_partition=15;
var sc_security="######";
var sc_remove_link=1;
//-->
</script>
<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><img src="http://c16.statcounter.com/counter.php?sc_project=######&java=0&security=######&invisible=1" alt="counter" border="0"> </noscript>
<!-- End of StatCounter Code -->
After replacing the &'s with &, I still get 4 errors.
there is no attribute "LANGUAGE"
there is no attribute "BORDER"
document type does not allow element "IMG" here;
end tag for "NOSCRIPT" which is not finished
Any ideas for how I can get this code to validate and, ya know, still actually do what it's meant to do in the first place?
Thanks in advance for any help.
& is replaced with & in the URL, the code validates to HTML 4.01 Transitional. In fact it's not too difficult to make it validate to HTML 4.01 Strict. The differences are that you must remove the language="javascript" attributes (which are not needed anyway), place the image within a block-level element within the noscript and swap out the border attribute for a bit of CSS: <!-- Start of StatCounter Code -->
<script type="text/javascript">
<!--
var sc_project=######;
var sc_invisible=1;
var sc_partition=15;
var sc_security="######";
var sc_remove_link=1;
//-->
</script>
<script type="text/javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript>[b]<div>[/b]<img src="http://c16.statcounter.com/counter.php?sc_project=######[b]&[/b]java=0[b]&[/b]security=######[b]&[/b]invisible=1" alt="counter" [b]style="border:0;"[/b]>[b]</div>[/b] </noscript>
<!-- End of StatCounter Code --> Tha above validates as Strict with no functional difference.