Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Selectors Advanced Selectors Pseudo-Elements - ::first-line and ::first-letter

Browser support for double colon (::) vs. single colon (:) notations

According to caniuse.com, IE8 only supports the single-colon CSS 2.1 syntax.

Would it be best practice re: accessibility to stick to single-colon syntax until IE8 depreciates completely, or should we consider using both single-colon and double-colon syntax, sacrificing brevity for thoroughness?

2 Answers

Daniel Gartland
Daniel Gartland
6,787 Points

I'd be careful of generalizing the browser usage stats from that W3Schools page. Those stats only reflect visitors to the W3Schools site (as stated on the page).

I think that it is fair to assume that the typical visitor to W3Schools does not represent the general browsing public. My guess is that W3Schools visitors are more than likely to be web designers or developers who would not be caught dead using Internet Explorer.

NetMarketShare reports that IE 11 is the most frequently used browser, followed closely by IE 8.0. This is not terribly surprising considering that Windows remains the dominant desktop OS by a huge margin. Chrome 40 comes in third, and Firefox 35 comes in fourth at about half the market share of Chrome 40.

It's worth highlighting that IE 8 market share is more than double that of all Firefox users.

Note - I am not trying to start an OS or browser war here. The unfortunate facts are that the habits of the general public lag well behind those of tech aficionados. If we fail to keep that in mind, we risk excluding (or presenting a poor user experience to) a large number of our viewers, and that just hurts the success of our sites.

Emma Willmann
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Emma Willmann
Treehouse Project Reviewer

I think knowing some numbers on this might help you decide. http://www.w3schools.com/browsers/browsers_explorer.asp is a list of how many users by % are using different versions of IE. it shows that only 8% of users use IE at all and 1.5% of all users are using IE 8 or lower.

Thanks for your feedback! The low percentage of users on IE is certainly a valid consideration, and the fact in and of itself provides assurance that in most cases, using the CSS3 double-colon syntax is safe for the overwhelming majority of internet users.

That being said, I feel like we have to be careful not to rely solely on such macro-level statistics. For instance, in the context of internet users worldwide, those with serious visual impairment may account for a relatively small percentage, but it's incredibly important that we cater to said users by providing design accessible to screen readers.

Also, if you find yourself designing/developing a product for a specific industry (i.e. real estate, restaurants, legal firms) you may find IE users represent a much larger portion of the pie, necessitating more consideration for older browsers.