Am I allowed to place <noscript>
in the <head>
?
The <noscript> tag defines an alternate content for users that have disabled scripts in their browser or have a browser that doesn't support script. Whilst it can be used in both the <head> and the <body>, when used inside the <head>, it must contain only <link>, <style>, and <meta> elements.
<noscript>: The Noscript element The <noscript> HTML element defines a section of HTML to be inserted if a script type on the page is unsupported or if scripting is currently turned off in the browser.
The most useful place to use the noscript element is in the head of the page where it would be able to selectively determine what stylesheet and meta elements get applied to the page as the page is loading rather than having to wait until the page is loaded.
Yes. I tested in FireFox and Chrome and it was requested. Show activity on this post.
According to the XHTML Strict DTD, no, you're allowed script, style, meta, link, object, title and base only. Transitional allows isindex as well, but still not noscript.
Using the HTML5 Doctype, I have a declaration in my <head>
with a <link>
element that points to a no-js.css stylesheet. It validates and seems to work fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With