HTML <noscript> Tag

The <noscript> tag displays a message if the browser does not support JavaScript. This element is placed inside a <head> tag or in a <body> tag.

HTML Tag

Example

#

A <noscript> tag.
If your browser supports JavaScript then nothing is shown.

<noscript>JavaScript is not supported by your browser.</noscript>

And, this is what you would see if your browser did not support JavaScript.

JavaScript is not supported by your browser.

Using <noscript>

The <noscript> tag displays its content if the browser does not support JavaScript.

If JavaScript is supported, then nothing is displayed.

This element is placed in either the <head> or the <body> tag.

More Examples

A <noscript> and a <script> tag. If JavaScript is disabled in your browser, it will display the noscript message. If it is enabled it will show the written script content.

<script>
  document.write("Congratulation! JavaScript is supported by your browser.")
</script>

<noscript>Oh no! JavaScript is not supported by your browser.</noscript>

Attributes for <noscript>

The <noscrip> element has no attributes, but it does accept global attributes.
The following attribute allows for programmatic access of this element.

Attribute Value Description
id    value Provides the noscript element with a unique identifier.

For additional global attributes see our global attributes list.


Browser support

Here is when <noscript> support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

Guides