(X)HTML validation with JavaScript

The W3C XHTML validator will complain if you've got JavaScript embedded in your markup and you haven't taken steps to make it (X)HTML friendly.

Either move the JavaScript into a file (in this example called script.js):

<script src="script.js" type="text/javascript"></script>

or add CDATA tags around the JavaScript that's embedded in the markup.

<script type="text/javascript">
<![CDATA[
... unescaped script content ...
]]>
</script>

References

Last modified: 08/05/06 21:51:44
Go to top

Related Pages

No related pages or links.

Login/out

Login

Forgot Password?
Go to top
Go to top