As the title itself says, what is the inherit and the initial in CSS?
As the title itself says, what is the inherit and the initial in CSS?
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 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.