Question! Do you think tech-savvy companies like Google, Facebook, Apple and Microsoft have better or worse web sites compared to such august bodies as the United States Senate, House of Representatives and Library of Congress, when comparing adherence to web standards, and best-practices like using CSS to separate content from style? The answer may surprise you - even after I've told you that the answer may surprise you!
First, some raw numbers; Out of the sites I mention above, only a single one passed the W3C's HTML validator; That of the Library of Congress. I should note here that I only tested each site's home page, all of which are fairly rich content-wise. While the LOC's web site had zero HTML errors, Apple's came close, with only two. The whole lineup:
- Library of Congress: 0
- Apple: 2
- House of Rep: 24
- Facebook: 36
- Google: 41
- Senate: 95
- Microsoft: 179
Also, the Library's now venerable (and much venerated) 'Thomas', which since the mid-1990's serves up massive amounts of legislative information, scored an admirable single error; One missing 'alt' attribute on an image. (the link image for one of their RSS feeds).
The W3C CSS validator reports the following numbers for CSS validation of the same pages:
- Library of Congress: 0 (Thomas had 4)
- Google: 1
- Senate: 2
- House: 10
- Microsoft: 37
- Apple: 74
- Facebook: 163
A pattern would be clear here were it not for three of the numbers in the above ratings; Apple's good rating on HTML, the Senate's dismal one, and Google's good rating on CSS. Google's single CSS error may be due to the relatively small amount of CSS that is actually on their home page. Considering they also had 41 HTML errors... As for Apple, it conversely actually has little HTML content on it's home page - it's mostly large images and some dynamic content. And one of their two HTML errors is actually a real hot-button for me; it's a use of a proprietary tag which only works on (wait for it...) the Safari browser. Comparing this performance to the very high 74 CSS errors (and yes, I checked against newer/older standards than the generally accepted current 2.1), and I dunno...
I was not surprised by how badly Microsoft's web site did on the HTML test. Facebook's 163 CSS errors on their home page was another story. But what impressed me was how well all three (or four, counting Thomas) Government sites did on the CSS validation. It would not be fair if I did not include some of my own work here: www.ParkersburgHS.org passes the HTML validation (0 errors) and has 1 error when validated against CSS3, due to my use of a non-standard implementation for transparency/alpha blending in Internet Explorer. My site www.ProEdgeBni.com also validates for HTML, and has a single silly CSS error I'll have to fix now that I know it's there!
But really, validation is not my (only) point. I am not a big fan of validation for its own sake. When I use validators, it is to catch silly errors like the one I noted right above. Too often, a small amount of 'invalid' markup or code must be used in order to get the desired result across different browsers and platforms. So, here's a somewhat more subjective guide, that still uses numbers: How many <table> tags do the pages use for layout purposes? Those numbers are easier: Only Microsoft, Google and Facebook use tables at all for layout, with Facebook being the only site out of all seven to have two tables total on their home page. The Senate site has one table, but it is not used for layout. This surprised me a bit; Especially considering it was not long ago when there were dozens of tables, many nested within others multiple levels deep, on Microsoft's home page in particular.
Due to the very small number of sites I was looking at, I would not read too much into this. I know for a fact that many government web sites I did not think of checking for this brief test would be very bad on all counts here. I also know there are lots of tech-savvy companies whose web sites espouse the value of Web Standards spoken of by their principals. But most of those companies are not large ones...
Finally, whatever ones opinion of the sites included in this brief review, the fact is that by no means at all is fancy-schmancy web design sacrificed by adherence to web standards. I encourage interested readers to see A List Apart (link), an online magazine dedicated to the finer points of the arts and sciences of web design and development; as well as Veerle Pieter's Blog (link), by she who has ceaselessly championed web standards in beautiful design for over half a decade now (an aeon in web-time!)
Itchin' to know more? Try the Web Standards Project (link), or maybe just some cute, cuddly kittens (link), instead. (btw; The cats have 7 tables used for layout, 11 CSS errors, and 175 HTML errors!)