heavenly_blue
01-20-2005, 05:16 PM
This does not validate. AFAIK, it still works in all modern browsers.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">
#noscript{display:none;}
</style>
<script type="text/javascript">
// Insert your annoying Javascript here.
</script>
<noscript>
<style type="text/css">
div{display:none;}
#noscript{display:block;}
</style>
</noscript>
</head>
<body>
<div id="noscript">
Insert a painfully long description on how to enable Javascript in the most common browsers.
</div>
<div id="container">
Insert your REAL site here.
</div>
</body>
</html>
Can anyone think of when this will not work? What problems could this cause? The only reason this doesn't validate is because <style> tags aren't supposed to be inside <noscript> tags.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">
#noscript{display:none;}
</style>
<script type="text/javascript">
// Insert your annoying Javascript here.
</script>
<noscript>
<style type="text/css">
div{display:none;}
#noscript{display:block;}
</style>
</noscript>
</head>
<body>
<div id="noscript">
Insert a painfully long description on how to enable Javascript in the most common browsers.
</div>
<div id="container">
Insert your REAL site here.
</div>
</body>
</html>
Can anyone think of when this will not work? What problems could this cause? The only reason this doesn't validate is because <style> tags aren't supposed to be inside <noscript> tags.