Inheritance in CSS
Inheritance
Inheritance is defined as the way in which properties flow through the page. A child element will usually take on the characteristics of the parent element unless otherwise defined. Therefore, we can assume that if a parent has color property and a child does not have it, then the child will inherit that property from its parent.
Syntax:-
Its syntax is:-
< style >
parent_element{
color: red;
}
< /style >
For your Information:-
All child elements in that parent_element will have a default color red.