One of my projects at the moment is an online shop for a new start-up social enterprise to run inside Shopify. So it seemed like the perfect opportunity to try build a beautifully degrading HTML5 design. Upon making that decision I realised there is a bit of a jump from passively reading about new features in the HTML5 spec to actually working out how to implement them.
Getting to grips with the concepts
At the moment it seems as though every other blog posts community out of the web community is about HTML5. However to help with actually implementing HTML5 I was looking for something a lot more holistic and cohesive, something that I could jump back to every other minute for advice and guidance.
HTML5 isn’t set in stone yet and understanding the processes that will shape it in the future is crucial to building a site that will still function once things settle down.
I found the brilliant site DiveIntoHTML5.org by Mark Pilgrim. The first few chapters (don’t be too daunted by the lengthy sound of that) could possibly be skipped, but give you a whistle-stop tour of how HTML5 came about, stretching backing to the dinosaur years of the early 90′s through the inner working of the W3C up unto the present day. This might all seem superfluous, but you have to remember HTML5 isn’t set in stone yet and understanding the processes that will shape it in the future is crucial to building a site that will still function once things settle down.
I haven’t made it through the full book yet, but found the description of new features, how to use them and links to the spec pages extremely helpful. Obviously we all think we are masters of Google, able to track down any information at a moments notice. But having someone to pull all this information together (and make it freely available) is a massive productivity booster.
I ♥ document hierarchies
A few CSS3 features had already popped up in some recent projects, mainly through a liberal sprinkling of rounded corners through the border-radius feature. However this was the first time that I had used HTML5′s new more semantic markup such as header, article, section, nav and aside.
Actually implementing these alternate tags proved a lot harder that I anticipated. Not due to any technical problems, but for example the distinction between a section and an aside can be a tough call. And there aren’t millions of sites out there yet to turn to for inspiration and examples (well this is the internet, there probably are millions, but you get what I mean). Fortunately the official spec provided examples of content for each, but in the end you just have to make a call and check back in a few months to see what other people are doing.
For me the saving tool was a little Chrome extension called HTML5 Outline to generate HTML hierarchies for the page, so that all your tag decision could be assessed in context. For anyone dynamically generating content and plugging widgets into multiple location, the new titling and hierarchy generation in HTML5 is a god-send.
And for those troublesome browsers
The community seems pretty strongly behind Modernizr at the moment to implement HTML5 and CSS3 features. A decision I have no qualms with.
Just link to the Modernizr JS script and you are away, with most of the new markup working in older browsers. However the real powerhouse of Modernizr comes from it’s feature support detection, which allow you to build fallbacks for browsers that don’t support the latest features.
I haven’t been getting too fancy, sticking with some additional CSS3 styling such as drop-shadows, multiple-backgrounds, gradients, rotation, transforms and rounded corners for now. Modernizr allowed me to go through systematically and think about how I wanted each element to look when the fancy features wouldn’t work.
To be honest most of these problems could be resolved with Progressive Internet Explorer (PIE), a script that you link to in your stylesheets to give IE a helping hand with gradients, corners and box-shadows. But Modernizr was crucial when the browser didn’t support multiple background and I didn’t want to leave it up to the browser to decide which was more important.
(Yes I know I’m getting into CSS3 here and not HTML5, but let’s forgive the little segway)
Wading further in
Was it mission critical to role out HTML5 markup and CSS3 features into the site? No. At the same time it proved far more than just a novelty.
The more semantic markup made me think harder about the rest of my code: how I organised my CSS classes and IDs, the document structure, how features will degrade in older browsers. And by the time the business I am working for goes live and gets established these HTML5 features will be more mainstream and my client should be ahead of the curve.