Hi, thanks for your response. So I do understand the instructions, I just don’t understand why the selector is written the way it is. Earlier, we were asked to create a selector for span “sr-only”. It was written like this: span [class~=“sr-only”]. But then for the next span selector, the one for years, we were told to write it like this: #years span[class]. I don’t understand why the format for the two isn’t the same.
I feel that maybe I am not getting the heart of your question yet. If the question is “why this vs that”, there is no specific reason to use one selector over another in general other than what is convenient.
I would guess the course is trying to teach different ways of selecting elements, but that’s just a guess based on the title of the course “Learn More About CSS Psuedo Selectors”.
Because the instructions are asking you to target any span with a class attribute inside the #years div. The first one does that. The second one does not. The second one targets any span with a class that includes the string “#years”.