CSS | all Property
The all property in CSS is the shorthand property that is used to set all the elements 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 property in a document.
Syntax:
all: initial|inherit|unset|revert;
Property Values:
- initial: This property is used to set all property to its default value.
Syntax:
all: initial;
Example:
<!DOCTYPE html><html><head><title>CSS all aroperty</title><!-- CSS all property --><style>h1, h3 {background-color: yellow;color: green;all: initial;}body {text-align: center;all: initial;}</style></head><body><h1>GeeksforGeeks</h1><h3>all property</h3></body></html>chevron_rightfilter_noneOutput:
GeeksforGeeks all property
- inherit: This property is used to set the all property from its parent element.
Syntax:
all: inherit;
Example:
<!DOCTYPE html><html><head><title>All Property</title><style>div {text-align:center;color:green;all:initial}h1, h3 {all: inherit;}</style></head><body><div><h1>GeeksforGeeks</h1><h3>all property</h3></div></body></html>chevron_rightfilter_noneOutput:
GeeksforGeeks all property
- unset: This property is used to specify that all the element properties should be changed to their inherited values if they inherit by default, or to their initial values if not.
Syntax:
all: unset;
Example:
<!DOCTYPE html><html><head><title>CSS all property</title><style>h1, h3 {background-color: green;color: white;all: unset;}body {text-align: center;all: unset;}</style></head><body><h1>GeeksforGeeks</h1><h3>all property</h3></body></html>chevron_rightfilter_noneOutput:
GeeksforGeeks all property
- revert: It is used to specify the behavior that depends on the style sheet origin to which the declaration belongs.
Syntax:
all: revert;
Example:
<!DOCTYPE html><html><head><title>CSS all property</title><style>h1, h3 {background-color: yellow;color: green;all: revert;}body {text-align: center;all: revert;}</style></head><body><h1>GeeksforGeeks</h1><h3>all Property</h3></body></html>chevron_rightfilter_noneOutput:
- Chrome 37.0
- Firefox 27.0
- Safari 9.1
- Opera 24.0
- CSS | transition-property Property
- CSS | top Property
- CSS | right Property
- CSS | bottom Property
- CSS | max-width Property
- CSS | column-gap Property
- CSS | animation-name Property
- CSS | height Property
- CSS | left Property
- CSS | perspective Property
- CSS | Display property
- CSS | transition Property
- CSS | grid Property
- CSS | border-top Property
- CSS | box-sizing Property
Supported Browsers: The browser supported by all property are listed below:
Recommended Posts:
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. 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.



