Hacker News new | past | comments | ask | show | jobs | submit login
W3schools: The Ugly, the Bad, and the Good (impressivewebs.com)
42 points by ImpressiveWebs on Feb 13, 2014 | hide | past | web | favorite | 51 comments

People keep telling me to use MDN but I find their sites bloated when I just want to quickly look something up (which is most often the case).

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 try to use MDN as often as I can; however, MDN often obscures the immediately useful information under copious amounts of text while W3 schools usually offers a quick use case that pretty much covers it.

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.

Yeah, that's my thing. Within 0.2s, I get the w3schools result . It's the first one in google so I click it automatically.

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.

Slightly offtopic, but when would you want to use a :before ?

It looks something out of CSS:the bad parts,ie looks very hacky but apparently is standard.

If for some design reason you wanted to add curly quotes around all links “” or perhaps display an attribute of the link as a hover-able tooltip, it would be better to use pseudo elements rather than adding content for the sake of the design.

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.

»Even after a redesign a few years ago, their pages still use “.asp”, which is basically an extinct platform that almost nobody uses anymore.«

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.

I friend of mine worked many years ago on a php site where all the php files ended in .asp due to a bunch of legacy and policy reasons.

Almost certainly. AFAIK this is the case with Urban Dictionary, for example; the URLs end with ".php" but the site is built on Rails. Not at all uncommon.

Of course they have, they would have to do a lot of work with their new URLs to be even close to as successful as they were before.

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)

We're talking about this through a non-responsive website laid out with tables, designed with inline styles, with ugly embedded code samples, and "bad" <br> tags. Maybe these aren't the most important things to think about when talking about the usefulness of a website.

To be fair, it was designed many years ago. The code samples are written ages ago. But regardless, sometimes, they are almost like an instant test bed for trying out some quick things.

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?

I'm getting pretty tired of these mindless defamations of W3schools. I get it - sometimes their resources are incorrect and they almost always use bad practices. But seriously, while you're busy being an elitist asshole slamming their website, the people at W3schools are busy teaching people the basics of web development.

Exactly. It just seems to be fashionable to write a blog post bashing W3Schools, PHP etc. Yes, some of their content might have technical inaccuracies. Yes, the design is dreadful. But, when you're quickly looking to find out what are the different properties that text-decoration supports, W3Schools is pretty damn useful. It's very good both as a quick reference or for quickly learning the basics before diving into actual development.

Actually, if you read the article you would have seen that, in the end, I specifically said that it's possible that they are doing the most important things right (focusing on speed and accessibility).

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".

w3schools is my go-to site for HTML, CSS, and javascript. I don't work with these technologies every day, so when I do I need a quick reminder, and w3schools provides just the right combination of succinct references and interactive example code. Really it's an essential resource.

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.

1. http://www.w3schools.com/about/about_helping.asp

2. http://w3schools.invisionzone.com/

How hard would it be to work with them to fix their content and HTML instead ? Did anyone try to contact them to make their site better ?

Maybe there are partly so popular because they are not trying to be perfect? When documenting things it is not just what you include, it is also what you leave out. Sometimes you want to full syntax for some specific SQL statement, sometimes you just want a few quick examples of the alter table and then figure out the rest yourself.

For example two approaches for documenting the HTML table tag:



It's not such much what they left out, it's what they put focus on: quick and fast examples, which is what people mostly want (the "Try it Yourself" is also a huge plus here). If i want more detailed docs, i'm more than willing to scroll down the page.

Just really sick of all the online drama, about any site. Just another typical post on HN criticizing another. You know what, You go build a site that is better and perfect. I am sick of people getting articles posted that just criticize. Go build something better, I dare you.

A lot of people have built "something better". But w3schools still ranks the highest. That's the point. There are many better alternatives but the Google rank kills the others.

Content is king? I'm reminded of Dan Cederholm's favourite website [1].

[1] http://simplebits.com/notebook/2013/02/16/food-for-thought/

The problem is that W3schools contents sucks as well. E.g., MDN is much better in comparison. http://www.w3fools.com/

The good: they put examples right at the top.

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.

> Even after a redesign a few years ago, their pages still use “.asp”, which is basically an extinct platform that almost nobody uses anymore.

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???

Agreed, as developers we know that when someone goes "hey, we should rebuild the entire (reasonably stable) project using another language!" that we should get the torch and pitchfork out.

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?!".

There's nothing wrong with using table for layout. Before calling me old school, let it be known that table can do responsive before even css2 was drafted. Also the rendering compatibility of table still looks pixel perfect now as how it was written in 1999.

Tables are anything but responsive. Responsiveness is not about fluidly changing the width of elements. You can't for example change 3 column layout to 1 column with tables.

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.

I sympathise with those using tables for layout considering how unintuitive the box-model is.

I agree. I get chuckle everytime someone complaints about a site using Table layouts on HN, which in itself is built on tables.

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?

Considering the fact that noone cares about semantics anymore (websites are not documents anymore, but software, just read every other thread which concludes that Javascript is mandatory nowadays) I'd say tables are perfectly fine.

The 'Duplicate Content' point in the article just plain wrong. It's not duplicate content - it's a load balancing and mirroring technique that's very common. For example, http://us2.php.net/echo and http://uk1.php.net/echo

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.

Load balancing should be transparent to the user. Pages with duplicate content should use <link rel="canonical">.

If we all waited until we were 100% accurate before critiquing anything, then nothing would ever be critiqued - calm down and take your own advice.

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.

Here are the subdomains they use:


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.

The general argument that you are making here seems to be something along the lines of: this site teaches web development, so it should practice what it preaches. You are saying nothing about the content of the site, its offering to users.

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.

> You are saying nothing about the content of the site, its offering to users.

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.

I've noticed that particularly in web development there's a lot of dogmatism and feel that a lot of the "best practices" (I personally hate that phrase...) being thrown around are just a way to make web developers feel like they're qualified and superior just because they can say "I follow the rules, you don't!" It's about making websites, not some sort of pseudo-religion. Do what you think is the best way to present your content, don't be a mindless follower.

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.

To the people defending W3Schools, please understand that some of us do our best to ensure that as much of the information that we consume originates from the most accurate, detailed, and authoritative sources that exist, regardless of usability, cost, etc. It bothers people like us that W3Schools is a top result at Google for so many search terms, in the same way that it bothers us that sites like CNN and Forbes are top results when searching for "health".

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.

It's still free. It works. It has a lot more than html and css. It has java, php, sql, even google api's and they seem to add more stuff every year. When it comes to teaching computer programming; I have not see one dude who I would pay. Maybe I haven't found the right dude? I take that back--I might pay David Maaaaan?(Harvard cs 75). I didn't realize just how good of an instructor he was until I saw the people who were going to teach the following courses. Following dude at Harvard,"I want to teach you the beauty of beautifully written code!" Let us see the beauty--please. A tip to anyone struggling along with these courses and languages--vlc has a "faster slider". It takes the verbosity out of some instructors.

Ever since I found MDN I add it to all my searches to get better 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.

w3schools : ugly design using outdated technologies relying on fugly markup. So what? Still handy and easy to use when I want a quick reference to a tag I've forgotten about.

Try to use the MDN instead. It has much better and accurate information. YMMV.

Nothing wrong with inline styles. I just love having everything in front of me without needing to look for selectors in a separate file.

While I agree with you it becomes a mess to manage duplicate and overlapping styles later. I usually start off with inline style and when I am happy it, I transition them to a css class.

> They Use Classic ASP

Maybe not:

  wget -S http://www.w3schools.com/
Shows a header of

  X-Powered-By: ASP.NET

For the most part, I don't mind w3schools ranking high in my search results when I just need to look something up really quick. I still believe they're basically a content farm, but on the other hand someone has to be the reference dictionary for HTML stuff. When I started out many, many years ago, I used a reference called SelfHTML which died out some time ago - and W3Schools mostly reminds me of that. However, my lookup workflow has changed, and I'm sure most other people are going in exclusively through Google as well.

I 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.

If you are looking for a 'HTML dictionary reference' site, try MDN.

I'm not, I thought I made that clear. I basically take the first reasonable-looking result on a Google search, as I believe do most people.

If it isn't StackOverflow or MDN then I will not click it. I've had bad experiences with garbage linkbaiting.

For me, it breaks down like this. For anything I've been away from for a while, the simpler sites work better. If I've been back involved (so I'm not asking simple questions), SO is the way to go. I'm ok with this.

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).

> > They Use Tables for Layout / They Use <br> Tags Badly

> 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.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact