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: Case Sensitivity
- CSS: Declare Charset
- CSS: Comment Syntax
- CSS: Default Unit
- CSS: Computed Style
- CSS: Pseudo Element
- CSS: Pseudo Class
- CSS: Specificity
- CSS: Data URI Scheme
- HTML: Protocol-Relative URL
- CSS: Browser Default Style Sheet (2025-12)