About the Pseudo-Elements
Browsers need to offer support to the CSS 1 and 2 and to accept the one-colon notation (:) when we use the pseudo-elements.
But following the CSS documentation, it's important to use double-colon notation (::) with pseudo-elements to make difference between it and pseudo-classes, which use one-colon notation (:). This improves the code readability and understanding.
For example:
Pseudo-elements:
p::first-line{
color: red.
}
Pseudo-classes:
About the Pseudo-Elements
Browsers need to offer support to the CSS 1 and 2 and to accept the
one-colon notation(:) when we use the pseudo-elements.But following the CSS documentation, it's important to use
double-colon notation(::) with pseudo-elements to make difference between it and pseudo-classes, which useone-colon notation(:). This improves the code readability and understanding.For example:
Pseudo-elements:
Pseudo-classes: