html tutorial - <noscript> Tag in HTML - html5 - html code - html form



no script  tag

Learn html - html tutorial - no script tag - html examples - html programs

  • The <noscript> tag specifies an alternate content for users that have disabled scripts in the browser.
  • Inside the <head> tag, <noscript> must have only <link>, <style>, and <meta> elements.
  • Inside the <noscript> tag, the content will be shown if the scripts are not supported in the user's browser.
  • The <noscript> tag belongs to metadata content, flow content and phrasing content.
  • The <noscript> tag supports Global Attributes and Event Attributes.

Syntax for <noscript> tag:

<noscript>content</noscript>

Differences between HTML 4.0.1 and HTML 5 for <noscript> tag:

HTML 4.0.1

  • The <noscript> tag can only be applied inside the <body> tag.

HTML 5

  • The <noscript> tag can be applied inside <head> and <body> tag.

Sample Coding for <noscript> tag:

Tryit<!DOCTYPE html>
<html >
    <head>
        <title>Wikitechy noscript tag</title>
    </head>
    <body>
        <script>
          document.write("Welcome to wikitechy.");
        </script>
        <noscript>
          Sorry,The browser does not support JavaScript!
        </noscript>
        <p>
          noscript tag is used to defined an alternate text for users 
          if the browser does not support script.
        </p>
    </body>
</html>

Code Explanation for <noscript> tag:

<noscript> Tag Code Explanation

  1. <noscript> tag is used to defined an alternate text for users if the browser does not support script.

Output for <noscript> tag:

<noscript> Tag Output

  1. <script> tag write the text “Welcome to Wikitechy” in the document, so the script executed.
  2. <noscript> Tag Output
  3. If the user disable the script execution, the browser shows the <noscript> content as “Sorry,The browser does not support JavaScript!”.

Browser Support for <noscript> tag in HTML:

Yes Yes Yes Yes Yes

Tips and Notes

  • The <comment> tag is used to "hide" scripts from internet without support for client-side scripts.

Related Searches to <noscript> tag in html