html The noscript tag is used to define alternative content (text) when the script is not executed. This tag can be used by browsers that recognize the <script> tag but cannot support the script in it. </script>
#html How to use noscript tag?
Function: Used to define alternative content (text) when the script is not executed.
Note: This tag can be used by browsers that recognize the <script> tag but cannot support the script within it. </script>
Note:
If the browser supports scripting, it will not display the text in the noscript element. 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 the script in comment tags. </script>
Older browsers (that do not recognize <script> tags) will ignore comments so that the content of the tag will not be written to the page, while newer browsers will know how to execute these scripts, even if they Surrounded by comment tags! </script>
html noscript tag usage example
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <script type="text/javascript"> <!-- document.write("Hello World!") //--> </script> <noscript>Your browser does not support JavaScript!</noscript> </body> </html>
Effect:
The above is the detailed content of How to use html noscript tag. For more information, please follow other related articles on the PHP Chinese website!