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:

**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