Selectors

I'm going to show some examples of selectors in this document. This is a paragraph.

This is another paragraph. The element selector selects all the elements with the given name. For example, you can do something like: p { color: blue; }

This is what I've done, and this will select all paragraph elements and make them blue.

Next, I'll demonstrate the class selector by making all elements with the class of "small" smaller.

This is a small paragraph.

This is a small heading.

Next, I'll demonstrate the ID selector by making the elements with the IDs of "largeP" and "largeH" larger

This is a large paragraph.

This is a large heading.

Next I'll demonstrate the pseudoselector. On hover, the button will become green. The first h3 element will be red.

First h3 element

Second h3 element