Home > Web Front-end > HTML Tutorial > How can we add a noscript section in HTML?

How can we add a noscript section in HTML?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-09-09 15:41:04
forward
1402 people have browsed it

How can we add a noscript section in HTML?

The task we are going to perform in this article is how to add a

For browsers that do not support script tags or are configured by users to disable scripts, HTML uses the

Note - This element is only used by browsers that do not support scripting.

grammar

The following is the non-script syntax

<noscript> Contents... </noscript>
Copy after login

Let’s dive into the following example to see how to add a noscript section in HTML.

Example 1

In the following examples, we use the

<!DOCTYPE html>
<html>
<body>
   <script>
      document.write("Tutorialspoint!")
   </script>
   <noscript>The Best E-way Learning</noscript>
</body>
</html>
Copy after login

When the script is executed, it will generate an output showing the text written in the script while retaining the text written in the noscript tag.

Example 2

Consider the following example, where we use

<!DOCTYPE html>
<html>
<head>
   <title>HTML noscript Tag</title>
</head>
<body>
   <script>
      document.write("Hello JavaScript!")
   </script>
   <noscript>
      Your browser does not support JavaScript!
   </noscript>
</body>
</html>
Copy after login

After running the above script, it will generate an output that contains the text written inside the script while preserving the text written inside the noscript tag on the web page.

The above is the detailed content of How can we add a noscript section in HTML?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template