For the record, I don’t hate w3schools. Apparently, a lot of people find their website useful. And from a human perspective, I’m happy for their success. After all, it’s run by one or more people, just like you and me, who have to feed their families.
But with everything we know about SEO and web development best practices, their ability to remain at the top of search results and also be in the top 200 most-visited websites in the world even after Google has made so many updates to their ranking algorithms, baffles us all.
In this post I’ll attempt to analyze a number of things about the w3schools.com website, both good and bad (mostly bad) and see if we can’t learn a few things and draw some conclusions.
And keep in mind that not everything I discuss here has an impact on SEO – or ever will for that matter – but I thought this would be a nice case study for some general do’s and don’ts.
They Use Classic ASP
Seriously? In 2014? Even after a redesign a few years ago, their pages still use “.asp”, which is basically an extinct platform that almost nobody uses anymore. VBScript, the language used in most classic ASP pages, is #98 in the top 100 programming languages by popularity.
I was a classic ASP developer for years, and it’s been about 7 years since I touched ASP, let alone coded it regularly. At the very least, couldn’t they reference directories with the “default.asp” hidden, to cloak this fact? In addition, they still have an entire section devoted to classic ASP tutorials (although this is not currently featured prominently).
Script Tag Madness
The code from one of their pages is shown below. It loads at least 15 different script tags, only two of which load at the bottom. Don’t tell Paul.
Interestingly, the generated source viewed in dev tools has 25
<script> elements, so they seem to be injecting quite a few of those on the fly.
They Use Inline Styles
There are tons of elements on w3schools that have inline styles and those same elements often have classes and IDs that apply CSS from external style sheets. I have no idea why they would mix and match their styles like this for such a large website that would be difficult to maintain even with good code.
Inline styles have generally been viewed as bad practice for years now for a number of reasons.
They Use Ancient Float-Clearing Methods
Littered in their code is stuff like this:
This is done with empty divs and
<br> elements. All of which could be corrected with a simple, reusable clearfix.
They Use Tables for Layout
This is not as bad as it used to be. From what I recall, before their most recent redesign, they were primarily using full table-based layouts for just about everything.
As shown above, they still use these in unnecessary places.
They Have Duplicate Content
This is something I examined in an older article, so check that out if you want more details – it’s pretty bizarre.
In short, they have duplicate content under different subdomains. Although duplicate content, for SEO, should be kept to a minimum, this doesn’t seem to affect their rankings. In fact, if anything, it seems to help them.
Their Embedded Code Examples are Ugly
It’s hard to believe a tutorial website as popular as w3schools would post code that looks like this:
Not only is it poorly formatted, but it’s not using syntax highlighting. And that’s just the on-page code examples in their lessons. Their own CSS is just as bad:
Code, especially in embedded examples, should always use good formatting for readability.
They Use Reflections
For this, I would penalize them in search rankings on principle alone.
2008 web design trends FTW!
They Think “CSS3” is Part of “HTML5”
We should sic Jeremy on them for this faux pas.
And what’s with the jaggedy HTML5 logo in GIF format? Shouldn’t someone who teaches web design know that PNG, JPEG, or SVG would be more appropriate in this instance?
<br> Tags Badly
<br> tag has its place, but if you’re using it to create margin/padding-like space inside elements (like w3schools often does), then you’re using it poorly.
And often they’re doing this before
<h2> elements and inside divs that have classes and IDs attached to them. Clearly they could do this in the external CSS instead or by using paragraph tags.
They Use the “keywords” Meta Tag
Of course, this won’t harm their ranking, but it accomplishes nothing and yet all their pages use it.
From what I can see, all pages use the exact same keywords, so it seems to be part of their basic site template and they’ve never removed it. “Just in case”, I guess.
Their Website is Not Responsive or Mobile-Friendly
This would probably be a tough one for an older site that’s as big as they are, but this should definitely be on their to-do list if they want to increase revenue.
Of course, I don’t think this would reduce their search rankings (does anything??), but they would be much more respectable with a proper mobile-friendly site.
Is There Anything Good?
So that’s much of the bad that isn’t covered elsewhere, and that sure was fun.
But is there anything good we can say about w3schools? There absolutely is, and these factors below might be more relevant than we realize.
Their Pages Don’t Have Major Accessibility Errors
While they do have 56 “contrast errors”, when testing their pages using WebAIM’s accessibility checker, they score fairly well, with no major errors.
By way of comparison, as of this writing CSS-Tricks had 3 errors and 70 contrast errors; Smashing Magazine had 4 errors and 0 contrast errors; A List Apart had 2 errors and 12 contrast errors; SitePoint had 7 errors and 42 contrast errors; and MDN’s reference had 1 error and 57 contrast errors.
Their Page Speed Tests are Strong
Amazingly, even despite all the extra script tags in the head, every page of w3schools.com that I tested using YSlow registered with an “A” grade, which is amazing. This is true even on the page mentioned above that loads 25 scripts.
In addition, they get a strong score for their home page and inner pages on Google’s PageSpeed Insights, for both mobile and desktop:
And they score well using other tools too:
MDN’s reference also grades with an “A” in YSlow, but the page speed tests tended to be slower:
As mentioned, w3schools’ strong rankings can be infuriating. But I wonder if a lot of what I’ve discussed here has something to do with their ability to maintain their rank.
Naturally, the age of their website and the number of inbound links they have play a major factor in their ranking. But consider the following:
- Just about all their pages seem to load fast, which we know is relevant to SEO.
- They use a lot of inline CSS, which, according to recent research, might be a good thing for performance.
- They don’t overuse various CSS3 and HTML5 effects, which again keeps their pages slim and fast (their home page and inner pages are about 350-550KB, which is reasonably good).
- They use alt text for images and, generally speaking, seem to have robot-friendly pages.
Yes, even after a redesign, their website still looks like it fell out of the 1999 tree, hitting every branch on the way down. And it’s been demonstrated that they have many technical inaccuracies in their content.
But those things that you and I personally find problematic don’t matter to Google’s ranking algorithm. Nor would it make any sense for Google to penalize them for “old school” practices. That would be detrimental to the integrity of the search algorithm because not only would it contradict giving higher rankings to older more established sites, but it would also go against the web’s friendliness towards backwards compatibility.
After doing this examination, and barring a conspiracy, I’m no longer too surprised that w3schools have good search rankings. And if they’ve helped beginners get their footing in the industry, then that’s a good thing.
Oh, and if you “view source” on any of my websites, you’ll see that I’m not exactly in a position to nitpickingly criticize others. It’s just too fun not to! :)