Selectors

Every HTML element supports a variety of attributes. Some of the common attributes we can use to style our elements are:

  1. Element Selector - Style any HTML Element p{}

  2. id Selector - A unique id that should only be used once.

  3. Class Selector - A style we can use on more than one element.

  4. Attribute Selector - More unique attribute contions.

  5. nth-child Selector - Odd or even, every first, second, third...

Multiple Classes, Multiple Styles

And we can apply multiple classes to a single element for additional styles.

Referencing multiple classes

Last updated

Was this helpful?