Looking for HTML5 Nirvana
Looking for HTML5 Nirvana
Join the DZone community and get the full member experience.Join For Free
This is a dumb question, but does HTML5 support true cross-browser compatibility? Or, I should say, is it browser-agnostic? I kinda thought the latest versions of the major browsers were all converging on the same standards anyway, so I tried doing a simple layout with absolutely no browser-specific elements. Here’s what it looked like in some different browsers.
UPDATE: I put the site back online at http://bigmath.herokuapp.com/ for folks to look at. If I had, ahem, known I’d be making this public, I’d have cleaned it up more, but this is the state it was in when I took the screenshots.
This article was originally authored by Tom Borthwick.
The numbers should really all be the same for comparison, but still, you get the idea. I don’t do much front-end design at all, and my html and css here are childishly simple. So is there a way to HTML5-ify them to get this mess straightened out?
I googled “HTML5 layout” and the first few results promise better cross-browser support with HTML5, but include parallel ‘moz’ and ‘webkit’ CSS elements, as well as huge swaths of IE-specific junk. I didn’t even bother checking out earlier versions of these browsers or mobile browsers.
There’s a wiki page on HTML5 for different browser engines, and it makes me think there’s not a simple HTML5 solution for all browsers out there. Or at least if there is, it’s well-hidden from front-end noobs like me.
A lot of articles and tutorials claim that HTML5 is great for multiple browsers, but then set forth the principle of ‘progressive enhancement’ or ‘graceful degradation’, which is the idea that it’s fine for different browsers to display the same website differently with it possibly looking much worse on some than others. This smells a little like a rationalization.
I have done a little GUI work in flex (Adobe’s SDK for the Flash Player) and I have to say, you do not encounter the concept of ‘graceful degradation’ when you write your UI with flex. For the most part, you don’t worry about browsers at all (except for things like ssl and tab behavior).
Now, I don’t want to be on the wrong side of history or put myself in the path of the pitchfork-wielding mob seeking to occupy flash. Flash is proprietary, has never been stable enough on macs or linux, and uses a plugin architecture that has always been problematic, so I’m okay to see it go if there’s a better alternative.
And we’re talking about HTML5 here- the One True Standard to Rule Them All. HTML5 has been marketed and hyped as heavily as any new technology I can think of. I thought writing a simple, horizontally-centered equation would be like pressing the easy button. For all the HTML5 headlines I’ve had to wade through, I want it to not just be possible to make consistent sites, but totally simple. It should be hard NOT to write a browser-agnostic site.
Surely I don’t have to write parallel pieces of my site for different browsers and even then have to accept differences, right? Do people just accept that, even with a technology so new its spec isn’t even done yet? Has everyone drunk the ‘graceful degradation’ kool-aid?
When people say HTML5 is the future, I believe them. Only, it looks like the future that Joe Hewitt warned about. There is no single care-taker, and the big players are just pushing and pulling the web to their best advantage. That’s not exactly news, but given the hopes attached to HTML5, it’s a bit more disappointing than usual.
Opinions expressed by DZone contributors are their own.