CSS all Property (original) (raw)
Last Updated : 23 Aug, 2024
The **all property in CSS is the shorthand property used to set all the element's values to their initial or inherited values or in some cases used to set the values to another spreadsheet origin. This property is used to reset all the CSS properties in a document.
**Syntax:
all: initial|inherit|unset|revert|revert-layer;
**Default Value: Its default value is none.
**Property Values:
- **initial: This property is used to set all properties to their default values.
- **Inherit: This property is used to set all properties to their inherited value.
- **unset: Indicates that all of the element's attributes should be updated to either their original values if they inherit by default or to their initial values if not.
- **revert: Undo or restore the previous state or value of a property or setting.
- **revert-layer: Reverse the modifications made to a specific layer, restoring it to its previous state or configuration within a software or system.
**Example: In this example, we are using all: initial property.
html `
CSS all property<!-- CSS all property -->
<style>
h1,
h3 {
background-color: yellow;
color: green;
all: initial;
}
body {
text-align: center;
all: initial;
}
</style>
GeeksforGeeks
all property
`
**Output:
GeeksforGeeks all property
**Example: In this example, we are using all: inherit property.
html `
All Property