CSS Inheritence - Inherit
I am a DIV
I am a Paragraph
I am a DIV
I am a Paragraph
I am a DIV
I am a Paragraph
The first block with class name withInheritOne has the font size set as 2 rem and has inherited to the child p tag without explicitly mentioning
The second block with class name withoutInherit has the border set to red and has not inherited to the child p as the border property by default doesnt inherit
The third block with class name withInheritTwo has the border set to blue and has inherited to the child p as we have overridden the default formal definition property
Please refer to MDN Docs for detailed information