How to remove all CSS classes using jQuery ? Last Updated : 31 Dec, 2020 Comments Improve Suggest changes Like Article Like Report In this article, we will remove all CSS classes for an element using jQuery. To remove all CSS classes of an element, we use removeClass() method. The removeClass() method is used to remove one or more class names from the selected element. Syntax: $(selector).removeClass(class_name, function(index, class_name)) Parameters: This function accepts two parameters as mentioned above and described below: class_name: It is optional parameter which is used to specify the class name (one or more class) to remove. Multiple class name separated with space.function: It is optional parameter and it returns one or more class name which need to be removed.index: This parameter is used to return index of element.current_class_name: This parameter returns the class name of selected elements. Example: HTML <!DOCTYPE html> <html lang="en"> <head> <title> How to remove all CSS classes using jQuery? </title> <style> .GFG1 { color: green; } .GFG2 { font-size: 30px; font-weight: bold; } </style> <!-- Import jQuery cdn library --> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script> $(document).ready(function () { $("button").click(function () { $("p").removeClass(); }); }); </script> </head> <body style="text-align: center;"> <h1 style="color: green;"> GeeksforGeeks </h1> <h3> How to remove all CSS classes using jQuery? </h3> <p class="GFG1 GFG2"> Computer Science Portal </p> <button>Click Here!</button> </body> </html> Output: Before button Click: After Button Click: Create Quiz Comment V vkash8574 Follow 0 Improve V vkash8574 Follow 0 Improve Article Tags : Web Technologies JQuery jQuery-Questions Explore jQuery Tutorial 7 min read Getting Started with jQuery 4 min read jQuery Introduction 7 min read jQuery Syntax 2 min read jQuery CDN 4 min read jQuery SelectorsJQuery Selectors 5 min read jQuery * Selector 1 min read jQuery #id Selector 1 min read jQuery .class Selector 1 min read jQuery EventsjQuery Events 4 min read jQuery bind() Method 2 min read jQuery blur() Method 1 min read jQuery change() Method 2 min read jQuery EffectsjQuery animate() Method 2 min read jQuery clearQueue() Method 2 min read jQuery delay() Method 2 min read jQuery HTML/CSSjQuery addClass() Method 2 min read jQuery after() Method 1 min read jQuery append() Method 2 min read jQuery TraversingjQuery | Traversing 4 min read jQuery add() method 1 min read jQuery addBack() Method 2 min read Like