Pseudo-elements are fictional elements that do not exist in HTML. They address the element’s sub-part. There are 2 types of pseudo-elements as “first-line pseudo-element’ and ’first-letter pseudo-element’. Pseudo-element is created by a colon followed by pseudo-element’s name,e.g:
P:first-line
H1:first-letter
and can be combined with normal classes;
e.g:
P.initial:first-line
The first line of this paragraph will be displayed in uppercase letters
Share with