CDATA and XHTML Validation
Recently I had to deal with some validation issues. When your code can not be validated due to some strange characters, or whatever things have to be there, we use CDATA mark to make it ignored by the parser.
The term CDATA (/ˈsi.deɪ.tə/), meaning character data, is used for distinct, but related purposes in the markup languages SGML and XML. The term indicates that a certain portion of the document is general character data, rather than non-character data or character data with a more specific, limited structure.)
http://en.wikipedia.org/wiki/CDATA
For example, if your JavaScript source contains many characters like the greater than (>), less than (<) etc., you have to put it in CDATA bounds to make it validated.
<script type="text/javascript">
<![CDATA[
... your code
]]>
</script>
Some JavaScript compiler will report error on the opening mark <![CDATA[, so just put the double forward slashes in front of them, they will be ignored too. Like this:
<script type="text/javascript">
//<![CDATA[
... your code
//]]>
</script>
Fair enough, huh? You can apply the trick with another language or style, like <!--<![CDATA[--> and <!--]]>--> for HTML, /*<![CDATA[*/ and /*]]>*/ for CSS.

XHTML is not that universal. It causes lots of validation problems. XHTML 1.0 Strict treat the attribute “target” of anchors <A> as invalid. Excessive enthusiasm makes web design less fun!