Which statement is true of the single colon (:) or double colon (::) notations for pseudo-elements-for example, ::before and :before?

Advertisement

  • All browsers support single and double colons for new and older pseudo-elements. So you can use either but it is convention to use single colons for consistency.
  • In CSS3, the double colon notation (::) was introduced to create a consistency between pseudo-elements from pseudo-classes. For newer browsers, use the double colon notation. For IE8 and below, using single colon notation (:).
  • Only the new CSS3 pseudo-elements require the double colon notation while the CSS2 pseudo-elements do not.
  • In CSS3, the double colon notation (::) was introduced to differentiate pseudo-elements from pseudo-classes. However, modern browsers support both formats. Older browsers such as IE8 and below do not.
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend