CSS Selectors

Until now when we’ve been writing our CSS we’ve used the name of our HTML tag to reference a particular element, like h2 or img.

But what if we don’t want to make all the paragraphs the same colour, or put a border on all the images? There are other kinds of selectors that we can use, by adding “tags” to our HTML, we can reference individual elements, or groups of elements instead.

To do this, we need to learn about two more HTML attributes - class and id.