What difference does inherit do? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What difference does inherit do?

p.normal { font-variant: normal; } p.small { font-variant: inherit; }

8th Apr 2016, 4:13 PM
Joshua JohnPaul
Joshua JohnPaul - avatar
2 Answers
+ 1
"Inherit" inherits the property from its parent element. That is, it'll be the same as its parent element's.
9th Apr 2016, 10:49 PM
Laszlo Weidinger
Laszlo Weidinger - avatar
+ 1
using inherit means that the property for which the property inherit value is provided will use the value of the same property of the parent element.
26th Jun 2016, 2:47 PM
Rajat
Rajat - avatar