Noscript HTML

HTML <noscript> Tag

To specify alternate content, if scripting is disabled from the browser and if the user still wants to access the web page, the HTML <noscript> tag is used. It can be placed either within the HTML<head> tag or the HTML <body> tags. When used inside the HTML <head> tag, it must contain the <link>, <style>, and <meta> tags.

Example:

<!DOCTYPE html>
<html>
<body>
<script>
document.write("I am an Example!!")
</script>
<noscript>JavaScript is not supported by your browser!!</noscript>
</body>
</html>

Explanation:

In the above example, we have used the HTML <noscript> tag to display alternate content in case the browser doesn’t support Javascript.

HTML 4 and HTML 5:

The HTML 4.01 <noscript> tag can be placed only within the <body> tag. However, the HTML5 <noscript> tag can be placed both within the <head> and the <body> tag.

HTML and XHTML:

The XHTML does not support the <noscript> tag.

Global attributes:

The HTML global attributes are supported by the HTML <noscript> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera, and Safari.