Cascade vs. Inheritance
Cascade: deals with precedence of style rules or CSS properties (i.e. the order in which properties are applied to an html element). It solves conflict situations.
Let me ask you a question:
What happens when we define set of style rules for a specific tag in external, internal as well as inline styles?
The answer is: “rules get’s cascade”
When we define a set of style rules for a specific tag in external, internal as well as inline style, then browser creates a virtual declaration list by merging all style rules together by following rules of cascade, and then applies the merged virtual declaration list to specified tag.
The rules of the cascade include:
1. Later properties (nearest) override earlier (farthest) properties
2. More specific selectors (less generic) override less specific (more generic) selectors
Inheritance: deals with how styles poured down from a parent element to its child elements. Certain properties, like font-family gets inherited. If you set a font-family on the body element, then it will get inherited by all the elements within the body. The same is true for color, but it is not true for background color, border-style,margin or height which will always default to transparent, none, auto and auto.
Follow the link for next video: https://youtu.be/WwTIrUrnFPA
Follow the link for previous video: https://youtu.be/uIjQeBemGgE
========= For more benefits & Be up to date ===================
Subscribe to the channel:
Like the Facebook fan page:
Visit to Chidre's Tech Tutorials website:
========== CSS Questions & Answers ========================
1. Which CSS style gets inherited to child HTML elements when applied to parent HTML element?
URBAN NATION MUSEUM FOR URBAN CONTEMPORARY ART is an international institution for art, creative projects and social exchange. Since September 2017 URBAN NATION shows under the leitmotif "Connect. Create. Care." that the house is far more than a museum.
Museum Opening hours Tuesday-Sunday: 10.00-18.00 Free admission.
Adress Bülowstraße 7, 10783 Berlin, Germany Contact [email protected] Follow Us.
IN THE STUDIO WITH … HAYLEY.
British born artist Hayley Welsh, has established herself as one of the newest creatives in the Western Australian art scene. There is something quite fantastical and a little bit dark lurking in Hayley’s work. Her latest work of art was created for the URBAN NATION and kicks off “The Monster Project”. We took the chance
Live @ the museum III – “Home” by Icy & Sot.
With her work made live in the URBAN NATION Museum, the artist duo once again draws attention to the fate of refugees and addresses the yearning for a home. Born in Iran, the artist duo Icy & Sot is known for addressing current political debates about war, peace, hope, despair and above all human rights […]
Three New Community Walls in June by Frz, Nafir & Xamoosh.
In addition to the two artists behind Icy & Sot, three other street artists from Iran will visit Berlin at the end of June and design one of our communiy walls on Bülowstraße. The three Iranians Frz, Nafir and Xamoosh are an integral part of the Iranian street art community. In their works, they address […]
Retrospective – SCOPE Art Show x URBAN NATION Museum.