HTML <noscript> Tag

The <noscript> tag has an alternative content displayed in the browsers not supporting scripts, or the browsers, where the user disables the script support. Otherwise, the browser ignores this tag and its content.

In HTML5 the <noscript> tag can be placed in the <head> and <body> elements. In HTML4 it can be used only in the <body> element. If the <noscript> is placed in the <head> tag, it must contain only the <link>, <style> and <meta> tags.

You can use the comment tag to "hide" scripts from browsers not supporting client-side scripts.


The <noscript> tag comes in pairs. The content is written between the opening (<noscript>) and closing (</noscript>) tags.

Example of the HTML <noscript> tag:

<!DOCTYPE html>
    <title>Title of the document</title>
      document.write("My first code in JavaScript!")
    <noscript>Sorry, your Browser doesn’t support JavaScript!</noscript>


noscript example


The <noscript> tag supports the Global Attributes and the Event Attributes.

Browser support

chrome edge firefox safari opera

Practice Your Knowledge

What is the purpose of the HTML <noscript> tag?

Quiz Time: Test Your Skills!

Ready to challenge what you've learned? Dive into our interactive quizzes for a deeper understanding and a fun way to reinforce your knowledge.

Do you find this helpful?