CSS CSS Selectors Going Further with Attribute Selectors and Pseudo-Classes Element States Pseudo-Classes

Aaron Coursolle
Aaron Coursolle
18,013 Points

Pseudo Elements and Element States Pseudo Classes?

I basically need a hook to hang my hat. I get the "Pseudo" part--anything labeled Pseudo simply means that it isn't explicitly in the code. But what is the difference between a Pseudo Element and Element States Pseudo Class?

1 Answer

Caleb Kleveter
Caleb Kleveter
Treehouse Moderator 37,861 Points

I think this post on Stack Overflow might help. Basically, this is how it works:


The pseudo-class concept is introduced to permit selection based on information that lies outside of the document tree or that cannot be expressed using the other simple selectors.


Pseudo-elements create abstractions about the document tree beyond those specified by the document language.