Home »
MCQs »
Advanced CSS MCQs
Which keyword inherits its value from its parent element?
17. Which keyword inherits its value from its parent element?
- inheritfromparent
- parenetvalue
- inherit
- inherits
Answer: C) inherit
Explanation:
The inherit keyword inherits its value from its parent element.
Example:
div.example1 {
border: 1px solid #006969;
}
p.main {
border: inherit;
}