Standards-compliance: this website’s approach

If you’re viewing this site, you probably have a good idea of what web standards are all about. If not, check out the Web Standards Project’s mission.

The terrible lack of standards support in older browsers gives all website creators a dilema: what browsers should I support? I chose to answer that question as follows: “none of them”. Rather, I’ll choose to support the standards themselves (that’s CSS 2.1, and HTML 4.01, for now) and let the browsers play catch-up.

OK, there are a few caveats:

That last point deserves a bit of an explanation: I hate CSS hacks. With a passion. That includes conditional comments, the ‘Holly Hack’, and the original (?): the Box Model hack. Yes, they demonstrate initiative, and some find them very useful, but—for me —they just add useless data to my brain. I won’t be covering CSS hacks at all; there are plenty of references out there.

Valid HTML 4.01 Strict Valid CSS!


Tweet

Comments

Tue 6 Oct 2009 07:52

Mr. Shiny & New

Mr. Shiny & New said:

So, you hate hacks, including conditional comments?

I guess this means that if you want your pages to support IE6 or 7 you are restricted to the subset of HTML that works the same in all those browsers, even if there is an alternate way to achieve the goal in IE.

Personally, I wish all browsers supported conditional comments. As a web designer I already have to decide how many browsers to test for, and have often found bugs that existed in certain browsers and not in others. CCs let me fix those bugs in IE without affecting the other browsers; I could have used them when dealing with a safari bug (display: table didn’t work in standards mode) or firefox 2 (no display: inline-block). Sometimes a browser you support just doesn’t play along with the rules and you have to rework a lot of code to make all the browsers agree. Accumulating bug fixes for a certain browser in a self-contained stylesheet makes it easy to keep the changes localized and drop fixes later on when you no longer need to support that browser.

Hacks, I will agree, are dangerous to use, mainly because you don’t always know what the side-effects will be. But CCs are clearly defined and have no undesirable side-effects on any browser that can parse comments. These days it’s clear that we often (re-)code pages to address specific browsers; pretending otherwise is just burying your head in the sand. Having a supported way of doing that would be nice.

Fri 17 Sep 2010 13:38

Erik

Erik said:

@Mr. Shiny & New, yah he has to use the css and html that works universally. Except that he says he 'supports no browsers', just standards.

I’m a developer and I personally feel that is a B.S attitude. Yes, the lack of standards between browsers is frustrating.

But how do your clients feel when you build them a site, they open it with there old IE that came pre-installed, it looks like crap, and you have to explain, 'i don’t support browsers, just standards'.

Makes you sound like an ass.

Leave a comment