HTML <noscript> tag

The <noscript> tag is used to provide alternative content to be displayed if the user is using a browser that does not support scripting or if the user has disabled scripts in their options in a browser that would otherwise support scripting. If neither of these conditions apply, then the content provided by the <noscript> tag will be ignored.

You can display anything you want with <noscript> (text, links, images, etc.)

This tag has no attributes specific to it.

Standard attributes

class, dir, id, lang, style, title, xml:lang

For more information on standard attributes, check out our HTML standard attributes reference page.

Event attributes

onclick, ondblclick, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onkeydown, onkeypress, onkeyup

For more information on event attributes, check out our HTML event attributes reference page.

Example

<html> <head> <title>Javascript script</title> </head> <body> <script type="text/javascript"> /* <![CDATA[ */ document.write("Here is some text"); /* ]]> */ </script> <noscript> Your browser does not support Javascript!!!!!!!! </noscript> </body> </html>
Output if the browser supports Javascript:
Here is some text
Output if the browser does not support Javascript:
Your browser does not support Javascript!!!!!!!!

Tips & notes

Place scripts on your pages using the HTML <script> tag.

The <noscript> tag should come right after the <script> tag in your code. This isn't required, but is a good practice since you are placing two tags that complement each other right next to each other.

Learn about scripting in detail in our Javascript tutorials and VBscript tutorials sections.

Web Reference
  1. CSS reference
  2. RSS reference
  3. HTML reference


© Copyright 2011-2012 Landofcode.com
Terms of use | Privacy policy | Copyright information | Make a donation