A CSS pseudo-element is a keyword added to a selector that is used to style a specific part of the selected elements.
We can add the generated content before or after an element is generated. Pseudo-elements allows to specify when to automatically generate content.
The pseudo-elements are
E
| generate content before the E element |
E
| generate content after the E element |
:first-line
pseudo-elementUsed to select the first line of a block of text. (e.g. paragraph, division text, etc)
E:first-line
where E is the element in which the first line is selected.
:first-letter
pseudo-elementUsed to select the first letter of a block of text. (e.g. paragraph, division text, etc)
E:first-letter
where E is the element in which the first letter is selected.