WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML <noscript> Tag


Example

Use of the <noscript> tag:

<script>
document.write("Hello World!")
</script>
<noscript>Your browser does not support JavaScript!</noscript>
Try it yourself »

Definition and Usage

noscript element is used to define alternative content (text) when the script is not executed.

This tag can be used to identify <noscript> Browsers that have tags but cannot support scripts in them.


Browser Support

Element
<noscript> Yes Yes Yes Yes Yes Yes

Tip: If the browser supports scripting, it will not display the text in the noscript element.

Note: Unrecognized <script> The tab browser displays the contents of the tab on the page. To prevent browsers from doing this, you should hide the script in the comments tab. Old-fashioned(Unrecognized <script>(Tag) browsers ignore comments, so they do n’t write the content of the tags to the page, and modern browsers know how to execute these scripts, even if they are enclosed in comment tags!

<script>
<!--
function displayMsg() {
    alert("Hello World!")
}
//-->
</script>