The CSS cascade is an algorithm who’s job is to select CSS declarations in order to determine the correct values for CSS properties
h2{
background-color: pink;
}
h2{
background-color:red; (Final Color)
}
CSS Cascade algorithm check:
1) selectors are are same in our example h2
2) if we apply any property to the final selector, then it will be applied for that selector.
in our example, the h2 selector having background-color property as pink, then we redeclare it and change its background color property to red, so finally h2 selector having color red