<noscript> tag

HTML <noscript> tag

You can use the <noscript> tag as a fallback content for the <script> tag.

The <noscript> tag  displays an alternative content in the situation when –

  • Either JavaScript is disabled in the browser, OR
  • When browsers does not support JavaScript.

You can code this tag inside the <head> or the <body> tag.

Syntax:
<noscript>text…<noscript>

Example

<p id="test"></p>
<script>
  document.getElementById("test").innerHTML = "Learn JavaScript from TutorialBrain";
</script>
<noscript>Browser does not support JavaScript!</noscript>

Default value

NONE

How Browser will display

BLOCK Level.

Difference between HTML4.01, XHTML and HTML5

HTML4 XHTML HTML5
You can use <noscript> tag only within <body> tag XHTML does not support this tag. You can use <noscript> tag within <body> or <head> tag

Attributes used with <noscript> tag

NONE

Global Attributes

The <noscript> tag supports global attribute.

Supporting Browsers

supporting-browsers for tags

Related Tags

<script> tag.

Tutorials for all brains!