Latest web development tutorials

HTML <noscript> tag

Examples

<Noscript> tag to use:

<script>
document.write("Hello World!")
</script>
<noscript>抱歉,你的浏览器不支持 JavaScript!</noscript>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Most browsers support <p> tag.



Tag definitions and instructions

noscript element is used to define alternate content (text) in the script has not been executed.

This tag can be used to identify the <noscript> tag but which can not support script browser.



Tips and Notes

Tip: If your browser supports scripting, it does not show noscript element text.

Note: Unrecognized content <script> tag browser will display a tag onto the page.To avoid browser to do so, you should hide the script in comment tags. Old-fashioned (not recognize the <script> tag) browser ignores comments, so that no content will be written to the tag on the page, and the new browser will know how to execute these scripts, even if they are enclosed in a comment tag!

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


The difference between HTML 4.01 and HTML5 in

In HTML 4.01, <noscript> tag is only allowed into the <body> element.

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



The difference between HTML and XHTML,

XHTML does not support the <noscript> tag.



Global Properties

<noscript> tag supports the global attributes, view complete the property sheet HTML Global Attributes .



related articles

HTML Tutorial: HTML Script