
Shung Chen
6,521 PointsWhat is the diff between these selectors: "ol li" and "ol~li"
as mentioned. thought both are targeting the second element
many thanks
1 Answer

Mohammad Azawi
Courses Plus Student 5,618 Pointsol li :
It will select the (li) element inside (ol) element
ol~li:
It will select (li) element that are siblings of and subsequent to any (ol) element
ps: the second selector is wrong because of their is no (li) element by itself.