+ 1
Can someone please give an example of how "inherit" is used in font variant?
2 Answers
+ 5
if you study the code below on how the output color is green you will understand better
<html>
<head>
<style>
body {
color: blue;
font-family: Arial;
}
p{
color: green;
}
</style>
</head>
<body>
<p>
This is a text inside the paragraph.
</p>
</body>
</html>
+ 2
Say you have a <ul> and the <li> tags inside had font-variant: small-caps; and inside those <li> you have a <p> and that paragraph tag has font-variant: inherit, it will inherit whatever the font-variant of its parent is, in this case the <p>'s parent is <li>, so it will inherit small-caps.