CSS: Pseudo Element
What is Pseudo-Element
“Pseudo-element” means part of an element, such as first letter, first line.
List of Pseudo-Element Selectors
pseudo element syntax change, one colon to two colons
in CSS 2, pseudo-element syntax is with 1 single colon.
e.g. :first-letter
in CSS 3 (2011), it's changed to 2 colons, e.g. ::first-letter.
This change is made so that there is distinction between 2 concepts:
- Pseudo Element. e.g.
::first-letter,::before - Pseudo Class. e.g.
:visited,:hover
Single colon is still supported in browsers, for backward compatibility.
As of 2018, most websites still use 1 single colon.
CSS. pseudo-element and pseudo-class
CSS. misc, advanced
- CSS: @media query (responsive design)
- CSS: Variable (Custom Property)
- CSS: calc
- CSS: Reset, Default Values
- CSS: global keywords (property values)
- CSS: nesting selector (ampersand &)
- CSS: Computed Style
- CSS: Browser Default Style Sheet (2025-12)