Got a rather annoying problem here. I am validating some pages and i just found out that it is not valid to have the <noscript> tag within the <head> tag…
However, the issue is that i am using the noscript tag to then show a <style> tag if javascript is disabled to clean up the page content and make it look pretty for those with it off… But the <style> tag is not valid within the <body> tag, but since the <noscript> is not valid within the <head> tag i am at a catch 22.
I found that a <noscript> tag is then valid in the <head> if you enclose it within an <object>, for whatever reason. But then it complains the the <style> tag is not valid within the <object>!
Unless there is a legit workaround (no messy javascript solutions) i believe this is one of the cases where ignoring the validation is the best approach.
So, anyone have any ideas?
Sample code:
[code=html]
<head>
<noscript> <—- Does not validate!
<style type=”text/css”>
some css styling fixes for no javascript…
</style>
</noscript>
</head>