How to reset/remove CSS styles for element ? Last Updated : 22 Nov, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report The browser uses some pre-defined default values to most of the CSS properties. These default values may vary depending on the browser and also the version of the browser being used. These default values are given in order to ensure uniformity throughout web pages. But in some cases these defaults result in an unexpected action to be performed by the web page, hence removing these defaults is a viable method.In most cases, the reset can be done using some pre-defined reset methods. There are many other reset methods. But the problem with those reset methods is that, they are used to remove all the styling present in a web page (remove all the browser defaults for all elements and their properties), but if we want to remove the default only or some specific style for one element then the value unset comes in handy. Problem Statement: Most of the cases the default buttons provided by web browsers are very bland and not stylized. To make it more stylized and to make it fit into the theme of the web page it could be stylized manually using CSS. But manual styles cannot be applied until the default styles are removed. Hence we apply the following code to remove the default styles present on a button.Example 1: Here you will see how to use unset property by HTML and CSS. This example remove only the default browser style. html <!DOCTYPE html> <html> <head> <title> How to reset/remove CSS styles for element ? </title> <style> body { display: grid; min-height: 100vh; } .gfg { all: unset; } .geeks { color: green; font-size: 3rem; } </style> </head> <body> <center> <div class="geeks"> <button class="gfg"> GeeksforGeeks </button> </div> <p> Here the GeeksforGeeks button is attached with the unset property </p> <br> <button class="GFG"> A Online Computer Secience Portal </button> </center> </body> </html> Output: Example 2: Here you will see how to trigger unset property by HTML, CSS an jQuery. html <!DOCTYPE html> <html> <head> <title> How to reset/remove CSS styles for element ? </title> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"> </script> <style> .geeks { all:unset; } div { color: Green; font-size: 44px; } </style> </head> <body> <center> <div id="myid"> GeeksforGeeks </div><br> <button id="gfg"> Click me to Unset CSS </button> <script> $('#gfg').click(function() { $('#myid').addClass('geeks'); }); </script> </center> </body> </html> Output: Before clicking the button: After clicking the Button: Comment More infoAdvertise with us Next Article CSS Style Declaration removeProperty() Method D DannanaManoj Follow Improve Article Tags : CSS Similar Reads CSS Style Declaration removeProperty() Method The removeProperty() method is used to remove the existing CSS property. Syntax: It is used to remove the specified CSS property. object.removeProperty(propertyname)Parameters: It accepts a single parameter: propertyname: It is a required parameter that contains a string that represents the name of 1 min read How to Remove Unused CSS From Your Website ? The CSS files of your website can sometimes become quite large. This will mostly happen when you will build new classes without deleting the old ones which you now have stopped using, making the CSS file very messy for other contributors to understand and modify. This can also happen if you use a pr 4 min read How to override inline styles with external in CSS ? In this article, we are going to learn how we can override inline styles with external CSS. Generally, we use inline CSS to override all the other styles. In some circumstances, we have to do the opposite. We have to override the inline CSS which has come from foreign sources and cannot be removed. 3 min read How to remove border from an editable element using CSS ? Given an HTML document containing some document and the task is to remove border from an editable element using CSS. It is a default behavior of any element which have content-editable attributes set to true whenever, the element gets a focus it will get a border around them. The task can be done by 1 min read How to Remove Default List Style from Unordered List in CSS ? Unordered lists in HTML are typically styled with bullet points by default. However, there may be instances where you want to remove this default styling for a cleaner look or to apply custom styles. In this article, we will explore various methods to remove the default list styling for an unordered 2 min read CSS element Selector The element selector in CSS is used to select HTML elements that are required to be styled. In a selector declaration, there is the name of the HTML element and the CSS properties which are to be applied to that element is written inside the brackets {}. Syntax:element { \\ CSS property}Example 1: T 2 min read Like