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.
A CSS pseudo-element is a keyword added to a selector that lets you style a specific part of the selected element(s). For example, ::first-line can be used to change the font of the first line of a paragraph.
/* The first line of every <p> element. */
p::first-line {
color: blue;
text-transform: uppercase;
}
Note: In contrast to pseudo-elements, pseudo-classes can be used to style an element based on its state.
Source: https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements