Element specific selector
We will now move on to combining selectors. The first combination we will examine is the Element Specific selector. In our Span example, let's assume we wanted one line to be red and the next line to be green. We could do this easily by adding a class to each span. To make it specific, the syntax needs to be written like this:
span.className
p#idName
ul.className
The element followed directly by the class or ID name with no spaces in between.
span.className
p#idName
ul.className
The element followed directly by the class or ID name with no spaces in between.