You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
a:hover{
color: blue;
}
The text was updated successfully, but these errors were encountered:
vanribeiro
changed the title
Double Colon Notation (::)
Double-Colon Notation (::)
Mar 23, 2020
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:
The text was updated successfully, but these errors were encountered: