CSS CSS Selectors Selectors - Beyond the Basics Child, Adjacent, and General Sibling Combinators

What is the diff between these selectors: "ol li" and "ol~li"

as mentioned. thought both are targeting the second element

many thanks

1 Answer

ol 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.