In CSS3 Inheritance is used to inherit the CSS property be the Child element from its parent element. separated by a colon.
If we apply some CSS properties on the parent elements then the child elements inherit most of the properties of their parent elements, unless some CSS rules override those properties. The property in which a child element inherits its parent element's CSS properties is called inheritance.
<style>
/*parent element*/
.parent-tdb{
color:green;
font-size:20px;
}
/*child element*/
.child-tdb{
font-size:10px
}
</style>
Here in the above code the child class "child-tdb" inherit the color property but not the font-size (override) CSS property from its parent element
<head>
<style>
.parent-tdb{
color:green;
font-size:20px;
}
.child-tdb{
font-size:10px
}
</style>
</head>
<body>
<div class="parent-tdb">TDB Tutorials
<h1 class="child-tdb">
This is a child class</h1>
</div>
</body>