What is the CSS inherit and initial used for? [duplicate]

0

As the title itself says, what is the inherit and the initial in CSS?

    
asked by anonymous 19.05.2017 / 15:26

1 answer

6

Inherit

Inherit simply means that the style will be inherited from the parent element.

According to W3C or Inherit : p>

  

Specifies that a property should inherit its value from its parent element. The inherit keyword can be used for any CSS property, and any HTML elements.

You can read more about Inherit here .

Initial

Initial denotes the initial value of the property, as defined in CSS :

  

Represents the specified value that is designated as the initial value of the property. The initial word can be used for any CSS property, and any HTML element.

In short, Initial is used to set the CSS property to its default value.

You can see an example of Initial here .

I phrased the answer based on on and in this issues, and I used free translation in some quotes.

    
19.05.2017 / 15:44