Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

html

What is the <noscript> element in HTML?

Abdul Monum

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

The <noscript> element in HTML is used to display alternate content in case the <script> element is unsupported on the browser or the user has intentionally disabled scripting in their browser for efficiency or security purposes. However, when scripting is enabled, the content inside the <noscipt> element is not displayed.

<noscript> is used inside the <head> and <body> elements. When used inside the <head> element, the children elements of <noscript> are restricted to <link>, <meta>, and <style>.

Example

Explanation

In lines 4-6, we write a simple script inside the <script> element that displays the message “Scripting is enabled on your browser!” on the webpage. In lines 7-9, we write an alternative message, “Scripting is disabled on your browser!”, inside the <noscript> element, which is displayed on the webpage if scripting is disabled or unsupported on the browser.

RELATED TAGS

html

CONTRIBUTOR

Abdul Monum
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring