Sorry, your browser does not support JavaScript! ``` --- ## Browser Support "> ``` --- ## Browser Support " />
Easy Tutorial
❮ Att Button Value Tag Ins ❯

HTML <noscript> Tag

Example

Usage of the <noscript> tag:

<script>
document.write("Hello World!")
</script>
<noscript>Sorry, your browser does not support JavaScript!</noscript>

Browser Support

Most browsers currently support the <noscript> tag.


Tag Definition and Usage

The noscript element is used to define alternative content (text) for users who have scripts disabled in their browser or have a browser that doesn't support script.

This tag can be used by browsers that recognize the <noscript> tag but do not support the scripts within it.


Tips and Notes

Tip: If the browser supports scripts, it will not display the text within the noscript element.

Note: Browsers that do not recognize the <script> tag will display the content of the tag on the page. To prevent browsers from doing this, you should hide scripts within comment tags. Older browsers (that do not recognize the <script> tag) will ignore the comments and thus will not display the tag's content on the page, while newer browsers will execute these scripts even if they are enclosed in comment tags!

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

Differences Between HTML 4.01 and HTML5

In HTML 4.01, the <noscript> tag was only allowed within the <body> element.

In HTML5, the <noscript> tag can be inserted into both the <head> and <body> sections.


Differences Between HTML and XHTML

XHTML does not support the <noscript> tag.


Global Attributes

The <noscript> tag supports global attributes. View the complete list of HTML Global Attributes.


Related Articles

HTML Tutorial: HTML Scripts

❮ Att Button Value Tag Ins ❯