HTML Tags – NoScript Tag


What is HTML <noscript> tag ?

HTML <noscript> tag is used to display the text for those browsers which does not support script tag (Javascript) or the browsers disable the script by the user.

This tag is used in both <head> and <body> tags.

When used inside <head>, the <noscript> element could only contain <link>, <style>, and <meta> elements.

How HTML <noscript> tag works ?

HTML <noscript> tag is used in browsers which does not support scripts or disabled the script by the user.

HTML <noscript> tag is used to display alternate text message.

Alternate content can be rendered by using <noscript> tag.

Alternate content within <noscript></noscript> tags will render only when JavaScript is disabled.


Why HTML <noscript> tag is used ?

To display the content inside the <noscript> element will be displayed if scripts are not supported, or are disabled in the user’s browser.

HTML beginners tutorial !!!

Click to Learn More about – HTML Tutorial for beginners

Syntax :

<noscript> Contents... </noscript>

Example :

<html>
<body>
        <h1>Welcome to CSTechbook</h1>
        <h2>HTML noscript Tag</h2>
        <script>
                document.write("CSTechbook!")
        </script>
        <!-- noscript tag starts -->
        <noscript>A computer science tutorial website...</noscript>
        <!-- noscript tag ends -->
</body>
</html>

Output :

<noscript> Tag Attributes

HTML <noscript> tag does not support any specific attributes.


Global Attributes

HTML <noscript> tag support following global attributes.

SnoAttributesValueDescription
1idunique_nameDeclared unique id for an element.
2classclass_nameDeclared one or more classnames for an element.
3stylestylesCSS inline styles specify an element.
4titletitleSpecify extra details of element contain, this will display as a “tooltip” for an elements.

Event Attributes

HTML <noscript> tag does not support any event attributes.

Browser Compatibility

SnoBrowserSupport
1ChromeYes
2FirefoxYes
3EdgeYes
4OperaYes
5SafariYes
6Internet ExplorerYes