To unset the value of an element, unset keyword is used.
The unset CSS keyword resets a property of an element to its inherited value if the property naturally inherits from its parent, or to its initial value if it does not inherit. In other words, it behaves like the inherit keyword in the first case, if the property is being inherited and like the initial keyword in the second case, if the property is not being inherited.
Example 1: unsetting the font color of an element to the initial default.
Example 2: Unsetting the font color to equivalent parent element’s value.
- Difference between revert and unset keyword in CSS
- CSS | unset keyword
- PHP | unset() Function
- PHP | Program to delete an element from array using unset() function
- PHP | Unset() vs Unlink() Function
- PHP | Unset Session Variable
- How to set and unset cookies using jQuery?
- Lodash _.unset() Method
- How to override the CSS properties of a class using another CSS class ?
- Difference between bootstrap.css and bootstrap-theme.css
- CSS | Percentage Value
- CSS Value | Angle
- CSS | [attribute$=value] Selector
- CSS | [attribute=value] Selector
- CSS | [attribute*=value] Selector
- CSS | [attribute|=value] Selector
- CSS | [attribute~=value] Selector
- CSS | [attribute^=value] Selector
- CSS Value Resolution
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.