CodeinWP CodeinWP

There’s No Such Thing as a “Standards-Compliant” Browser

There's No Such Thing as a Standards-Compliant BrowserI think this is a pretty basic point, but I often see people throwing terms around in inappropriate ways (which I’ve also been guilty of), so I thought I would clear this up.

As fallible humans we tend to lean towards making excuses, blaming others, or trying to justify our mistakes or shortcomings. This is why you’ll often read comments from people discussing CSS and web standards, and they’ll say “I don’t use Internet Explorer; I use a standards-compliant browser”. Well, no you don’t. Nobody does.

Every Browser Has Bugs

If you’ve read my stuff here or on other sites, then you know that I spend a lot of time on SitePoint’s CSS Reference, and I also own the hard copy book, which I read cover to cover when I got it. If you browse through that reference, you’ll see that every browser has significant bugs in the way it interprets or parses CSS code.

Of course, the bugs that occur in Firefox are not nearly as major as those that occur in Internet Explorer, especially versions 6 and 7. And even IE 8 has a slew of bugs related to CSS and JavaScript (although to this day I have never required an IE8-only hack or conditional comment).

Some Browsers Are Just Cutting-Edge

Just because WebKit-based browsers support stuff like transitions and transforms, does not mean they are more “standards-compliant”. In fact, the opposite is true. If you want to get all technical about it (well, maybe you don’t, but you know I do!), supporting vendor-specific syntax properties and values makes a browser less standards-compliant.

Update: As shown in the comments, people are misunderstanding my point here. I’m not saying that supporting vendor syntax is wrong. My point is that since it doesn’t validate, then in the strictest sense of the word, it’s “not standard”. This is not a criticism of browsers that use vendor syntax, but just further evidence that no browser can be called “standards-compliant”.

But obviously that kind of cutting-edge technology is not a hindrance to our workflow, whereas the bugs that plague IE6 and IE7 can be great hindrances at times, requiring hacks (in the case of IE6) and workarounds (in the case of IE7).

The point is: If Google added a feature to Chrome that made it do your laundry, would that make Firefox 4 “not standards-compliant”? Obviously not. And it certainly wouldn’t make Chrome any more standards-compliant (unless the spec said that browsers were required to do your laundry).

Standards Are in the Hands of the Developer

I’ve said this before, and I’ll say it again: You can code a perfectly valid CSS layout with very few hacks that works well in IE6 and IE7 (assuming a significant percentage of your visitors are in those browsers, which would require you to support them).

Standards are the responsibility of the web designer, and not just the browser. The browser (or user agent) does lay the groundwork, but it cannot decide what code you’re going to use to create your layout. That’s up to you and me, the designers/developers.

If we blame our lack of understanding of CSS on a browser that’s not “standards-compliant”, then we’re not only making a false statement (no browser even comes close to being “standards-compliant”), but we’re also shifting the blame for our own inadequacies.

So let’s get busy studying CSS concepts a little better, and make our websites standards-compliant and accessible — no matter what browser they’re viewed in.

29 Responses

  1. ptomli says:

    “supporting vendor-specific syntax makes a browser less standards-compliant.”

    How so? Vendor-specific extensions are part of the CSS spec back to (at least 2.1). The fact that an extension is available does nothing to diminish other compliant behaviour of the browser.

    • Good point, but I was talking about the property and values supported in vendor-specific syntax, not just the actual “hyphen” that appears in front of it. The vendor-specific stuff are usually not as far along in the spec, so those could be construed as being non-standard. They’re certainly “cutting-edge” but they’re not “standard”.

      Couple of examples: text-stroke and box-reflect don’t seem to be part of any spec, yet they’re supported by WebKit. Same with ::selection. Those are not standards.

      • ptomli says:

        Support “the standard plus vendor extensions” cannot be construed to be “less standards-compliant”. You’d have to demonstrate that by supporting vendor extensions the browser fails to support the standard, which would be difficult.

        Vendor extensions also tend to be used as scratchboards for incomplete implementations of the standard.

        To think of it another way, is OS X not POSIX compliant because it adds display PDF and Cocoa?

  2. Corey says:

    “supporting vendor-specific syntax makes a browser less standards-compliant.”

    That makes no sense. How does supporting syntax outside of the standard diminish a browser’s compliance to the standard?

  3. Ferdy says:

    And once again I could not disagree more.

    First, the point of @ptomli. He is right, the adaptive and progressive implementation of parts of a standard have been standardized as well. So something like moz-border-radius is vendor-specific yet standards-compliant.

    Second, “I’ve said this before, and I’ll say it again: You can code a perfectly valid CSS layout with very few hacks that works well in IE6 and IE7”

    The fact that you need hacks at all prove that these browsers do not understand code based on standards. Just the fact that you only need a few hacks does not make the situation any better. We could also debate endlessly what a hack is. IE6 does not even understand the box model and you can produce valid code to work around that. Your code may be valid and even work, but it is still a hack. It is a smart trick to force an incompliant browser to behave into compliance, one that would not be needed if the browser implemented the standard correctly in the first place.

    “Standards are the responsibility of the web designer, and not just the browser”

    It is the responsibility of the designer to produce standards-compliant code and for the browser to render this as per the standard. In theory that is, because in practice it is the browser that often screws up the rendering of perfectly valid code. This is not the fault of the designer but the browser manufacturer.

    Overall, you again have the world upside down. You know, they call the web the most hostile deployment environment ever. In no other part of software engineering do you have to cater for so many unknowns in the target environment and incompliant platforms that you are forced to support. For years we have had this movement where developers are screaming for more compliant browsers, only to force the vendors to improve, yet you somehow keep defending the status quo, suggesting that IE6 and IE7 are not bad browsers, and that it is us developers that need to ramp up. Ridiculous.

    • Ferdy,

      #1 – Yes, I’ve corrected that statement slightly. What I’m talking about here is the definition of “standards-compliance”, which people misuse. Browsers are not standards-compliant. If the vendor syntax doesn’t validate, then the validator is telling you something. Saying a browser is “standards-compliant” is like saying bricks and wood are “house-compliant”. Whether or not bricks and wood are built into a house is dependent on both the materials and the builder.

      #2 – In what way does IE6 “not understand the box model”? That’s false. It’s IE5.5 that doesn’t understand the box model. IE6 understands it just fine (aside from some insignificant things related to borders and overlaps, that aren’t even noticeable). IE6’s problems have nothing to do with the box model, but are associated with floats, margins, positioning, etc. You’re not the only one who has made this false claim though, so I don’t blame you. For example, this article by Chris Coyier is a great summary of IE bugs. Unfortunately, the first one on the list is misleading because he’s talking about IE6 in quirks mode, which is a non-issue.

      #3 – Yes, developers are screaming for “more compliant” browsers. I have no problem with that. That’s the point of this article, that some browsers are “more compliant” than others. But there is no such thing as a “standards-compiant” browser.

      #4 – Thanks for your comment, I don’t have any problem with correcting my view if I’m wrong, so I appreciate the thoughts. :)

    • Slight correction: “margins” are part of the box model, but the IE6 margin bug is only present when floats are used. So it’s not necessarily the “box” that’s causing problems, but a combination of things, which is often avoidable with proper forethought.

      • Ferdy says:

        Thanks for your comments. I don’t think you’re wrong about any of these specifics. It’s just that I think you are playing semantic word games. Everybody knows that there is no perfectly compliant browser. However, everybody also knows that when we speak of compliant web browsers, we mean the family of browsers being FF, Chrome, Opera, Safari and the like. When we speak of non-compliant browsers we generally mean IE6 and sometimes IE7. It is industry jargon that is generally accepted.

        That aside, I have the biggest problem with you giving IE6 and IE7 too much slack and partly placing the problem at developers. You sorely underestimate the damage Microsoft has done to our industry. IE has managed to hold back innovation on the web for a decade or so. It has wasted billions of dollars in lost productivity of companies worldwide. All the while it was developers inventing tricks around it and screaming for relief. If it wasn’t for this decade of struggle and market movements by Google and Apple, we’d still be in browser hell today, and partly we still are. The fact that we now have educated ourselves in the minimum use of hacks has come from developers, not from Microsoft.

        • I agree, Ferdy. I pretty much said exactly what you said in this article:

          Dear Microsoft: You Missed the Boat

          Microsoft have made many mistakes, but I think we can work around those mistakes with a better understanding of HTML and CSS.

          As a side point, it could be said that Microsoft is now ahead of the game standards-wise, because of IE9 Beta’s support of many of the more established HTML5 and CSS3 standards, combined with accurate support for CSS 2.1.

          • Ferdy says:

            Nice article, thank you.

            Microsoft is not ahead of its game in browser land, IE9 is not released yet and once it will, it will only work on newer versions of Windows. As for the compliance, it is making awesome progress but still only implements HTML5 very selectively. I recently saw a series of articles (I forgot where) that listed all known HTML5 and CSS3 “features” compared with browser support. IE9 was sorely lacking in many places compared to other browsers.

            Anyway, the movement is positive. Now if only MS would actually continuously upgrade their browser instead of making a release once in two years, they can quickly catch up.

  4. nick says:

    I use a standards-complaint browser, especially when commenting on blog posts. ;)

  5. lewismc says:

    You put a good case forward that no browser can be considered standards compliant but, as Ferdy argued better than I, we all know what that phrase means; that we prefer to use the most up-to-date release of the most standards-compliant browser and this will likely always be the case regardless of the manufacturer albeit that MS will continue to get the flack here due to their legacy and release/update strategy.
    I question your motives for this otherwise balanced article though, did you really write this because developers (as humans) are justifying their own short-comings by stating they do not use Internet Explorer? Really?

    • When people say that IE is not a standards compliant browser, it’s like they’re shifting the blame — meanwhile this is true of all browsers.

      My point here was not to say that IE6 and IE7 are equal to modern versions of FF, Opera, Safari and Chrome. My point was to get people to understand that saying that a browser is “standards-compliant” is not correct. What they mean to say is “IE has more bugs” or “The other browsers are less buggy”.

  6. funcakes says:

    This is all academic. Software is riddled with hacks. Jesus, look at the apple plist format. Even golden boy has dirty secrets!. You see, as much as the high and mighty might like to forget, the truth is that your job is not to support your favourite browser or CMS vendor, it’s to make websites that work for your customers, and you have to support them, not deride their stupidity.

    That is all

  7. Scott says:

    Perhaps I am too trusting of people’s intelligence, but when anyone mentions a “standards-compliant browser,” I’m sure they are under no impression that their browser has zero bugs. The phrase is used to differentiate Chrome/Firefox/Opera from the failings of Internet Explorer.

    The key difference between IE and standards-compliant browsers is that IE falls at the first hurdle – margins on floated elements, :before and :after and long-serving selectors like “A+B” or “:first-child” – whereas other browsers tend to exhibit bugs only in complex edge cases.

    Sure, no browser will ever be 100% standards-compliant – that’s pretty obvious given the complexity of HTML/CSS. But when I’m building a website, I know that Firefox/Chrome will follow the standards to a very good degree, but Internet Explorer will almost certainly cause me headaches.

    • Agreed. I just want to make sure people aren’t inadvertently misinforming. I know they never mean “standards compliant” in the absolute sense of the word, but sometimes the phrase is used as a bit of a cop-out, to explain why their designs don’t look good in IE6.

      Just like my bricks/house illustration in a previous comment: Websites can be “standards-compliant”; browsers almost certainly cannot (at least not yet).

    • Yuhong Bao says:

      “The phrase is used to differentiate Chrome/Firefox/Opera from the failings of Internet Explorer.
      And once it was used to differentiate IE6 from IE5.5 and Netscape 4.

  8. Ted Temecula says:

    Oh, but how nice would it be if there was standards compliance for browsers. But instead developers are left to code and style for the ever-growing list of browsers. When does it end?!

  9. Xcellence-IT says:

    I agree with you, its not only browsers but web designers and developers needs to be standard compliant to make site work well across browsers… But before applying browser specific fixes its important to find how many visitors are going to use those browsers…

    • Louis says:

      IE isn’t just terrible with markup/css. Look at how it failts consistantly with AJAX, and sometimes even server-side code. It’s getting rediculous. MS needs to stop. It costs companies a lot of extra money to have their developers make code that IE renders correctly. Luckily I’m past that stage but AJAX is still giving me a hard time.

  10. Sam says:

    it seems odd to me that there is a specification outlined by the w3c and we (as developers) are expected to code things in a ‘compliant’ manner and keep things as semantic as possible etc. yet the delivery method by which our work is relayed to the consumer is very rarely actually holds up to the standards that are outlined! It seems ludicrous that this is the case, i never heard of a publishing house having to worry about whether or not certain books will display the ink properly….

  11. Yuhong Bao says:

    It certainly did not help that CSS 2.0 was not free of problems either (I read it was more like a wishlist), which is why CSS 2.1 was created to solve the problems.

  12. Markk says:

    Well, you say there are no standards compliances in Browsers, but for me standards are what is used by the major amount of people (or browser in this case). If I make a CSS code with a CSS cleaner which will remove browser’s default settings for CSS and execute my code in Firefox, Chrome, Safari and IE, I’m sure it is going to react exactly the same way in the first three browsers, but in IE it’s a completely different story. I wonder, now that we talk about that, why IE makes things so complicated and so different from other browser. I know each browser makers add their own functionnalities, but IE goes to even modifying the way things should be made. I know in terms of popularity IE is on the top, but in terms of efficiency in giving similar results than the other three, it’s a total mess. So SCREW IE as it’s the worst browser ever made. It’s a pain in the ass when you are happy of your hard worked code, you test it in FF, Chrome and Safari, that it’s fine, and when you test in IE (hoping for the best) and that you just realize it’s a mess and it’s a to the point of restarting from zero. Really frustrating. That’s my point and the one of many other CSS and Javascript programmers.

  13. qammar says:

    HI, very good point and very usefull for all developer, coder and gurus. almost all browsers have bugs, we all know. and as I experice a very strange thing with FF when I use google image seaerch it stop responding. When I try chrome it work well with google images search. may be some nasty-coding in search for FF. But I am not quite sure. any other person experience the same thing?

    thank you for all the goud stuff.

  14. eleven11 says:

    Hi, I completely agree that there is no such thing as a ‘standards compliant’ browser. And I also agree that a browser using vendor specific extensions makes a browser less compliant, it is inherent in the statement; Vendor Specific. Not standard. I don’t think the point here was to say you cannot produce standards compliant code, but we all know that you have to throw in a few pieces of redundant vendor code where required to produce the same result in every browser. This would simply not be the case if there was such a thing as a standards compliant browser. I also don’t think that making the argument that it is IE vs the rest is what standards really are. It is just as annoying to have webkit and moz extensions as it is to have proprietary IE code, and it certainly doesn’t mean the rest are standards compliant. In my opinion, we should just stop talking about ‘standards compliant’ browsers, and be focusing on the fact that we produce cross browser compatible code. Realistically, if you were to tell your client that you only produce standards compliant code, then you are actually telling them you produce code that does not work in all browsers, what you should be telling them is that you produce standards compliant code, and then you produce browser specific code to make their website cross browser compatible. That way you are actually educating them as to how the web works as well as providing them with an awesome website.

  15. Russell Horwood says:

    Why are compliance levels sooo low? If I were writing a browser I would use the standards documents as the specification and not settle for anything less than 100%.

  16. Jertsy says:

    You’re just rolling out the same old crap about web designers not being good at coding if it doesn’t work on outdated (and updated) ie versions. Users should have to gain a license to view the internet with opening ie being the first fail and typing the url into the google search bar the second fail.

  17. Changwan Ryu says:

    I don’t think supporting vendor-specific syntax makes it impossible for a browser to become standard-compliant. Not being able to do laundry on Firefox in your example does not make Firefox less standard-compliant or anything in the most strict sense.

Leave a Reply

Comment Rules: Please use a real name or alias. Keywords are not allowed in the "name" field and deep URLs are not allowed in the "Website" field. If you use keywords or deep URLs, your comment or URL will be removed. No foul language, please. Thank you for cooperating.

Markdown in use! Use `backticks` for inline code snippets and triple backticks at start and end for code blocks. You can also indent a code block four spaces. And no need to escape HTML, just type it correctly but make sure it's inside code delimeters (backticks or triple backticks).