CSS pseudo class vs pseudo selector

This is a bit pedantic question, but maybe worth asking. Is there any mechanical difference between a pseudo-class and a pseudo-selector in CSS? We use the term interchangeably here, but it seems that there is a reason for the two terms. Is there any use for differentiating the two?

+7
css terminology css-selectors
source share
3 answers

A pseudo-class is a certain thing , and a pseudo-selector is a made word.

(Meanwhile, a pseudo-class matches an element when certain conditions are fulfilled (for example, the mouse pointer points to it or it is the first child of its parent), while a pseudo-element is something that can be matched, but not a real or whole element, such like β€œThing before an item” or β€œThe first line of text in an item.”)

+11
source share

the pseudo selector makes an odd appearance on the W3C site, but my initial search shows that this is an old old term, which is now replaced by the pseudo-class:

pseudo selector

page pseudo selector: first

http://www.w3.org/TR/2004/CR-css-print-20040225/#section-selectors

CSS has a pseudo-selector "lang" that automatically uses the appropriate attribute depending on the type of media

http://www.w3.org/TR/xhtml-media-types/

pseudo class

5.11.4 Pseudo-class language :: lang

http://www.w3.org/TR/CSS2/selector.html#lang

... and much more.

Pseudo-Elements and Pseudo-Classes

Then descriptions of pseudo-elements and pseudo-classes are described:

http://www.w3.org/TR/CSS2/selector.html#pseudo-elements

So, it seems to me that pseudo selectors are no longer in fashion ...

+6
source share

a pseudo -class is the actual psuedo element, such as: hover ,: active, etc.

a pseudo selector is a complete selector that contains / uses a pseudo-class. such as: hover, a: active

but a pseudo - class is what people need to say / type. The pseudo-selector, I think, came from people, knowing that there are "pseudo" and "selectors", so "why the hell aren't they being collected?" kind of thing.

+2
source share

All Articles