What is the use of the “no-js” class in HTML ? Last Updated : 22 Apr, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report Purpose: The primary purpose of the no-js class is to allow the use of CSS to style JavaScript-free pages, i.e. defining CSS styles for JavaScript-enabled browsers as well as for JavaScript-disabled browsers. Thus, the "no-js" class will only be present if JavaScript has been disabled. This enables styling a pure HTML and CSS page without the use of any client side-scripting. But if JavaScript is enabled, it removes the "no-js" class automatically. The "no-js" class is available in the markup by default. The "no-js" class is basically a way to be able to style things with or without using JavaScript. The "no-js" class is added to the topmost html element which serves as an instruction for Modernizr. Syntax: <!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]--> Example: html <!DOCTYPE html> <html class="no-js"> <head> <script>document.documentElement.className = document.documentElement.className .replace(/\bno-js\b/g, '') + ' js '; </script> <!-- Other files and libraries to be included --> <head> <body> <center> <h1>GeeksforGeeks</h1> </center> </body> </html> Output: Comment More infoAdvertise with us Next Article What is the use of the “no-js” class in HTML ? V verma_anushka Follow Improve Article Tags : JavaScript HTML-DOM Similar Reads What is the use of <legend> tag in HTML ? In this article, we will discuss <legend> tag in HTML. The legend tag is used to define the title for the child's contents. The legend elements are the parent element. This tag is used to define the caption for the <fieldset> element. Syntax: <legend> Some Text...... </legend 1 min read What is the use of html() method in jQuery ? The html() method in jQuery is used to get the contents of the first element in the set of matched elements or is used to set the HTML contents of every matched element. It returns the content of the first matched element. This function does not accept any arguments. Syntax: $(selector).html();Appro 4 min read What is the use of css() method in jQuery ? In this article, we will see how to use css() method to set the styles on elements dynamically using jQuery. The css() method is used to change the style property of the selected element. basically, The CSS() method is used to get the value of a certain CSS property that has been applied to a specif 2 min read What is the use of asterisk (*) selector in CSS ? The asterisk (*) selector in CSS, known as the universal selector, is used to target and apply styles to all elements on a webpage, regardless of their type or hierarchy. It's especially useful for global styling, such as resetting margins or applying uniform properties across the document.For examp 2 min read What is the meaning of DOCTYPE in HTML ? The HTML document type declaration or Doctype is an instruction used by web browsers to fetch what version of HTML the website is written in. It helps browsers in understanding how the document should be interpreted thus eases the rendering process. It is neither an element nor a tag. The doctype sh 2 min read Like