W3schools: The Ugly, the Bad, and the Good
impressivewebs.com
impressivewebs.com
Random examples:
http://www.w3schools.com/cssref/sel_before.asp vs https://developer.mozilla.org/en-US/docs/Web/CSS/::before
http://www.w3schools.com/cssref/pr_background-repeat.asp vs https://developer.mozilla.org/en-US/docs/Web/CSS/background-...
I've tried using other resources but I hate this whole "let me show you most of the site in 0.2s, anddddd let me load everything else for another 3" just to look pretty.
It looks something out of CSS:the bad parts,ie looks very hacky but apparently is standard.
Things that are subject to change and attributed to design choices rather than content choices are much easier to add and remove via `:before` or `:after` vs. going through the code and adding or removing elements.
eg. https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/S... vs. http://www.w3schools.com/html/html5_webstorage.asp
Also, if I don't get there by google search, I have a really hard time following a tangential thread through MDN.
I usually just open both resources—and often a third related blog post or SO question—and whichever one helps the best, I use.
Someone might tell them that URLs don't need to point to files and don't necessarily give a clue about the technology underneath. Their server says
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
so they might just use ASP.NET and just have rewriting or routes set up to mimic their old URLs.It's absolutely fundamental to keep the same URLs when you are trying to beat the absolutely best at SEO (They are beating people like MDN, made by freaking Mozilla, after all)
Not as useful as MDN, but w3school had served its purpose.
Side note: has w3school ever been hacked given it being a high-profile website?
The fellow who's so upset about their coding standards--I would suggest he visit their "Help us" page[1] and the "Forum" page[2] where he can contribute his expertise.
For a free, low-ad site, w3schools is remarkably useful. I hope this kind of article doesn't damage them too much. I'd be quite upset if they went away, or if they became more ad-heavy or subscriber-based to pay for all the fancy updates that he wishes they'd do.
And the fact that they are a good beginners resource doesn't make their own site's bad practices good practices. Even beginners know how to "view source".
For example two approaches for documenting the HTML table tag:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ta...
When I search for a css selector or an html5 tag, 99% of the time I'm looking for a quick, easy-to-read example that demonstrates the syntax.
I have no way of measuring my average-time-on-page for w3schools, but I'd estimate it at under 2 seconds. And for that, it works really, really well.
The only viable use of tables for layout is when you need to center something vertically. Even then it's better to skip using the tag and apply display: table; and display: table-cell; to respective elements.
However, I find it even worse when people try to recreate a simple table using layers of divs only to represent a series of tabular data. Why take something simple and make it very complex, unmanageable and less cross compatible?
[1] http://simplebits.com/notebook/2013/02/16/food-for-thought/
And? For all we care, it could be built in FORTRAN and still be a valuable resource. What in the name of the Flying Spaghetti Monster an argument is that???
If it's not broken, and there's still developers capable of working on it, do not rewrite it. Especially not to impress a bunch of nerds who're sat going "ASP?!".
Also, as ygra has already pointed out, the .asp extension doesn't necessarily mean they're using ASP. They've possibly just kept the extension and they're routing to something more modern with URL rewriting.
If you're going to critique other people's work, make sure you know precisely what you're talking about first.
This is a classic example of duplicate content in the SEO sense: there are multiple separate URIs which present the same content to the user. That's definitionally duplicated; the fact that it's down to badly-implemented load balancing is irrelevant.
The obvious correct solution would be to handle the load balancing at the DNS level, or with a single canonical load-balancing endpoint. If that's not possible, then using <link rel='canonical'> tags will indicate to search engines that the URIs point to the same resource, allowing a single canonical URI to be defined.
http://jsbin.com/upamof/1/edit
If they are "load balancing", then why aren't they using geo-specific subdomains? As shown above, their subdomains are keyword stuffed. If you're right, then they're certainly doing it in a very bizarre manner.
However, their own focus seems to be on offering a useful learning resource, not replying to the critics. I find their content fairly good for absolute beginners. Even if they grossly oversimplify their subject, they offer the best way to get up to speed on the basics of many new technologies. That's why they are high in the search rankings - no mystery there.
I think their users are aware that they are only learning the basics, and will have to move on to more sophisticated resources to continue with their learning. So what? An absolute newbie can learn to write html, css or javascript, and see the results of his work displaying in a browser, in less than half an hour. That first step is often the most difficult for the total beginner
So give these guys credit - they are offering a pretty good learning resource for the basics. I'm not ashamed to admit I used it a lot at the beginning of my career as a self-taught web developer. And then I moved on.
Here is a quote from the article:
> 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.
Certainly that qualifies as saying "something" about the content of the site.
After all, who goes around viewing the source of webpages they visit (unless something is terribly broken and you want to find out why)? If I can see the content I couldn't care less.
This is from the perspective of someone who has done a lot of "web development" with nothing more than a text editor and a browser (or several)... I've used w3schools as well as the official HTML specs; I don't care what the latest fads are and don't even want to expend the effort to, I just do what works to show the content I want to show to my visitors and that's it.
We realize that people such as yourselves have no problem consuming information from low-quality sources such as W3Schools, CNN, and Forbes, and most of us don't care where you get your information from. We would just prefer that our search results not be polluted by the low-quality sources that people such as yourselves link to and, thus, push to the top of the search results.
But before I found MDN, I used w3schools all the time. My coworkers still use w3schools.
I don't see a problem with it. Sure, their site is not using best practices, but their information is good enough in a pinch.
Maybe not:
wget -S http://www.w3schools.com/
Shows a header of X-Powered-By: ASP.NETI think most of these issues the article points out are somewhat short-sighted and superficial.
> They Use Classic ASP
I'm not sure they actually do, but even if that's true it's probably a choice they made in ancient times and they're sticking to it. And honestly, why not? It's not like we're dealing with a highly complex site that needs to be agile and extremely dynamic. They're probably just doing some light templating stuff and that's it.
> Script Tag Madness
That's a good point and it seems like an easy fix. However, most of these script tags seem to point to external vendors - most prominently Google - and that's probably why they're not messing with them.
> They Use Inline Styles
I agree it looks bad and it's also pretty easy to fix. On the other hand, those few extra bytes don't actually harm anyone. It's not pretty, but the argument that it makes the site hard to maintain is probably incorrect. I would think that no matter how many pages there are the number of actual templates used is quite small.
> They Use Ancient Float-Clearing Methods
Again, this is probably a hack from the dawn of time, and it seems to work. Would they do it the same way today? Probably not. But is it worth the hassle of taking it out for no reason other than pleasing nitpickers? Nah.
> They Use Tables for Layout / They Use <br> Tags Badly
Historically, for a while there that was an absolutely valid choice. Though I wouldn't write table-based layout code without cringing today, I have to take a stand here and assert that tables are not that bad of a tool. The standard argument that div/CSS-based table-like features are always better is somewhat hollow given the reality of actually dealing with the code. In practice, even CSS gurus do layout with HTML element structure all the time, they're just not open about it.
> They Have Duplicate Content
I'm not sure why Google doesn't filter these out. Not fixing that is somewhat of an atrocious move on W3Schools' part, but you can't really blame them for wanting the ad revenue.
> Their Embedded Code Examples are Ugly
That's true, they could do with an update. Syntax highlighting would be great.
> They Use Reflections / They Think “CSS3” is Part of “HTML5” / They Use the “keywords” Meta Tag
I don't care.
> Their Website is Not Responsive or Mobile-Friendly
Personally, I think that's a huge plus. I'm almost always annoyed when I get the mobile version of a site.
I really dislike the fact that I can't distinguish in my search results between good SO results and bad SO results. So many times I'll click their result only to go to a page that has been 'closed because ...'
Sometimes I can still see the answer there (someone will have answered before it was closed), but often SO is a huge time-waster for simple things.
I find W3Schools to be the fastest solution for figuring out why my 'font-decoration' css style isn't working (like I had to do yesterday).
> Historically, for a while there that was an absolutely valid choice.
In addition, posting the story on HN is quite funny as HN is built on nested tables with invisible gifs for indentation.