Pseudo class, pseudo seletors and pseudo elements

Hello

having ROUGH time understanding pseudo class, pseudo seletors and pseudo elements concepts

this is new to me and i know there maybe a lot to learn

please clarify / explain these concepts. or point me in the direction that would be helpful

again, this is new (and a bit intimidating) so i ask for a simple (for now), and clear explanation

also, please give 2 - 3 examples

MANY THANKS!!

Hey @obxjuggler

There are some great docs on MDN for your reference:
Pseudo-classes - CSS: Cascading Style Sheets | MDN (mozilla.org)

Think of it as adding some already created functionality onto your selected elements. For example, if you want to add an effect to a button that once your mouse hovers over it, it changes color. It will look something like this.

One pseudo class is ‘:hover’

button:hover{
background-color: red;
}

If your button is now hovered it will turn red. The ‘:hover’ is some code that has already been written and you can make use of it by referencing it.

here is one more example. Another common used pseudo class is ’ :nth-child(). It allows you to select child elements based on an argument like ‘even’

If you have 4 list items it will select 2 and 4 and make your requested changes to it

li:nth-child(even){
border: 1px solid red;
}
:nth-child() - CSS: Cascading Style Sheets | MDN (mozilla.org)

Hope this helps!