Forum Moderators: open
If you can spot the problem, I’d really like to know what I’m doing wrong. It works fine if I don't use Javascript, but I need to.
----- Here's an example -----
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>won't validate</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript">
<!--
document.write( '<style type=\"text/css\">{ color:red; }</style>' )
//-->
</script>
</head>
<body>
<h1>This text is red.</h1>
</body>
</html>
----- here's the error -----
Line 8, column 69: end tag for element "STYLE" which is not open