HTML 5 <noscript> tag
Definition and Usage
The <noscript> element is used to define an alternate content (text) if a script is
NOT executed.
The <noscript> element does not do anything, but is used for browsers that recognizes the <script> tag, but
does not support the script in it.
Differences Between HTML 4.01 and HTML 5
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's content as text on the page. To prevent the browser 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 will not write the tag's
content on the page, while 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>
|
Try-It-Yourself Demos
Work with browsers that do not support scripts
How to handle browsers that do not support scripting.
Whether you're new to XML or already an advanced user, the user-friendly views
and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to
meet your XML and Web services development needs from start to finish.
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- Support for Office Open XML (OOXML)
- Graphical WSDL editor & SOAP debugger
- Java, C#, C++ code generation
- And much more!
Download a fully functional free 30-day trial today!
|