Pseudo-element
In CSS, a pseudo-element
selector applies styles to parts of your document content in scenarios where there isn't a specific HTML element to select. For example, rather than putting the first letter of each paragraph in its own element, you can style them all with p
::first-letter
.
Updated on April 20, 2024 by Datarist.