Coding task · HTML and CSS course · Module 3: CSS Basics

CSS Property Inheritance

Explore CSS inheritance like passing down power through a dynasty.

Task

In style.css, uncomment the declarations in the .dynasty rule (font-family, color and font-size) and in the .pharaoh rule (color). Observe that headings and paragraphs inherit the font and color from their parent, .heir takes its color from .pharaoh, and border and padding are not inherited.