Some property values are inherited from an ancestor. This is known as 'inheritance'. For example, if you give a container element a value for 'color', then any text within the container will inherit that value. This applies not just to the children of the container, but all descendants of whatever generation.
Inheritance only applies to some properties, and many of them are lesser-used types beyond the scope of this course. (Visit the W3C website for the complete list of properties that do and do not inherit values.) Of the properties that are relevant here, most relate to paragraph text and lists:
- Font styling e.g. colour (color), font-family, font-size, font-style, font variant, font weight, letter spacing, line height
- Text-indent, white-space, word-spacing
- List styles
Inheritance is often used to set default styling for these properties.