I\'m going to have an exam tomorrow and I\'m trying to understand the meaning and the answer of
Selector grouping and Contextual Selector
While I searched
Basically what you looking at is the following.
for
a. Selector grouping example
td, th, li { property: value; }
what the above is saying that you want to have the same value for the same property for all td,th, and li
b. Contextual Selector example
table p { property: value; }
this one is saying that you want to set the value for <p>
tags that belongs to <table>
tags
so whenever you have a <p>
in a <table>
, then it will get effected.
Selector grouping: Groups the kinds of elements to which style is applied.
Contextual Selector: Check the context of the class in the html tree, assigning the style to the element through a specific route, taking into account the order of depth in the tree.