HTML <noscript> tag
Definition and Usage
The noscript element is used to define an alternate content (text) if a script is
NOT executed.
This tag is used for browsers that recognizes the <script> tag, but
does not support the script in it.
Differences Between HTML and XHTML
NONE
Tips and Notes
Note: If a browser supports scripting, it will not display the text
in the noscript element.
Note: Browsers that do not recognize the <script> tag will display the
tag content as text on the page. To prevent browsers from doing this, you
should hide the script in comment tags. An old browser (one that does not
recognize the <script> tag) will ignore the comment, and not write the tag
content on the page. A new browser will understand that the script should
be executed, even if it is surrounded by comment tags!
Examples
JavaScript:
<body>
...
...
<script type="text/javascript">
<!--
document.write("Hello World!")
//-->
</script>
<noscript>Your browser does not support JavaScript!</noscript>
...
...
</body>VBScript:
<body>
...
...
<script type="text/vbscript">
<!--
document.write("Hello World!")
'-->
</script>
<noscript>Your browser does not support VBScript!</noscript>
...
...
</body>
|
Standard Attributes
| id, class, title, style, dir, lang, xml:lang |
For a full description, go to Standard
Attributes.
Event Attributes
NONE
Try-It-Yourself Demos
Work with browsers that do not support scripts
How to handle browsers that do not support scripting.
Learn XML with <oXygen/> XML Editor - Free Trial!
 |
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|