Understanding CSS selectors

I need some clarification on something, I taught my self the basics of CSS, BEFORE I started learing HTML…I know now it should have been the other way around…

Mosh is talking about all the different types of CSS selectors, when i learned the basics of CSS I was finding the class but using chrome dev tools but ONLY looking for the classes. and somes times those classes did not work, perhaps this is why…

Based on what I am leraning here, if i cam looking for CSS class to style something, it could very well be an iD or soe type of other selector.

Is this right, am I understanding this?

I think if I am understand correctly some CSS selector doesn’t seem to be working. I think it might just be css specificity. (element tag, class, id). If you have an element that have both class and id and they both are trying to change for example the color, it would have the color of the id since it is more specific.