Possible Duplicate:
What is the difference between a pseudo-class and a pseudo-element in CSS?
What do the following mean in CSS?
- Pseudo class
- Pseudo selectors
- Pseudo element
What is the usefulness of each?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Pseudo-classes are used to select elements according to information that you can’t otherwise express using attributes, IDs or classes (or any other info available through the DOM). For example,
:root,:first-child,:last-child,:lang()and:not().Pseudo-elements are mock elements that you can apply styles to selectively as part of other actual elements, but aren’t themselves members of the DOM. For example, content fragments such as
::first-lineand::first-letter, or generated content such as::beforeand::after.“Pseudo-selectors” is an umbrella term used to cover both kinds of selectors (or really any selector that begins with at least one
:), but it is itself meaningless, because in Selectors, pseudo-classes and pseudo-elements are two fundamentally different things.