![]() |
|
|
If you use the <script> or <style> tags on your page, you need to put the content of those tags in a CDATA section. If you don't, the browser sees characters like < in your code as the start of a tag. So, the point of CDATA sections is to tell a browser to ignore characters that it would otherwise see as markup. The only delimiter that is recognized in a CDATA is the "]]>" string which ends the CDATA section. None of this applies if you:
It applies when you put code on the page. For example <script language="JavaScript">
<!--
<![CDATA[
function mouseon() {
var el = event.srcElement;
var thisclass = event.srcElement.className;
if (thisclass=="parent") {
el.style.color = "tomato";
}
}
|
More information So how is XHTML different to HTML? All attributes need double quotes The id attribute replaces the name Scripts and styles need cdata |