Types of CSS selectors

CSS selectors

What are they?

Selectors are the part of CSS rule set. CSS selectors select HTML elements according to their id, class, or element. The video below demonstrates how they are used.

Note: The YouTuber uses an external style sheet to declare his code. You can use < head > and < style > tags to declare your selectors.

CSS selectors

4 different types of CSS selectors