I was presenting some designs to a client a couple of weeks ago when this question came up:
“Will you be building this site with HTML5 in mind?” Naturally, I was happy to answer that one! It went a little like this:
Erm, I don’t really know, and I wouldn’t want to lose those visitors. Maybe we’d better not build it in HTML5 after all.
Whoa there! No need to be so hasty. We don’t have to use HTML5 exclusively, but we can still use it to develop specific parts of the site. How does that sound?
Great! Let’s do it!
Which bits of HTML5 can I use right now?
Rich: Lots of them! Here’s a short list of cross-browser (including IE) compatible techniques that you can use today:
- Change your doctype
- Simplify your character set
- Simplify your
- Use block level linking
- Get into the habit of using HTML5 class names in your HTML4 markup
- Use the new form input types, as they degrade gracefully
- Use elements such as
<time>to add semantics that will be interpreted by leading browsers
- Use the
<audio>elements, and then make them degrade gracefully (see our article on audio or Video for Everybody)
<style> elements) but avoid using new block-level elements like
What are the benefits of using HTML5 now?
Rich: Here are several, in no particular order:
- Cleaner markup
- Additional semantics of new elements like
- New form input types and attributes that will (and in Opera’s case, do) take the hassle out of scripting forms
- Staying ahead of the curve before HTML5 becomes the mainstream markup language. Use this as a selling point when talking with your clients
What are the downsides to using HTML5 now?
Rich: Obviously, you make some trade-offs when using HTML5:
- The spec isn’t finished and is likely to change
- Not everything works in every browser (but you could say the same about CSS, right?)
Should I tell my clients I’m using HTML5?
Remy: No. When I go to buy a car, I don’t ask about the parts in the engine. I just want to know what it looks like, how much it costs, its level of quality, features, etc. Sure, some people are mechanics, but most aren’t.
Clients aren’t developers, so they shouldn’t influence your decision on what technology to use. When they ask
“What technology are you going to use?” or
“Should we be using HTML5?”, we, as developers, should tell them:
It depends on your product and your audience. Do you have any usage statistics that I can see?
Rich: Yes, you should. If a client doesn’t want to use HTML5 for a project, simply explain the benefits mentioned above. Point out that their site will be built using an up-to-date markup language, so it’s less likely to need updating in a few years. It’s “future-proofed”, and it will save them money in the long run.
What if my client mentions that “HTML5 won’t be finished until 2022″?
Rich: Politely inform them that it’ll be closer to 2012 (and some might argue even sooner). Tell them you’re building this site with an eye on the future and that it will help them in the long run. In my opinion, it’s only fair to inform your client that you’re using HTML5 (depending on their position and level of understanding), though in some cases it won’t matter because they’re only concerned with how the site looks in the browser they use.
Remy: My opinion is that you shouldn’t be discussing with the client which technology to use — only (perhaps) providing justification as to why you’ve used a particular technology. You can assure them that SEO and compatibility won’t suffer, but just as you don’t offer accessibility as an optional item on the menu (well, I certainly hope you don’t), you shouldn’t offer HTML4, XHTML, or HTML5 as a menu item either.
Will using HTML5 negatively affect my clients’ search engine rankings?
Rich: No. Google is properly indexing sites built with HTML5. Take our site for example — it’s doing just fine.
Have you built any client sites with HTML5?
We haven’t used it as much for full-fledged HTML5 apps that use all the new markup and new APIs – but rest assured, there is work in the pipeline.
Rich: I’ve also recently released an events site for the agency I work for that uses new HTML5 elements.
So should I be using HTML5 in my projects right now?
Well, as with all projects, it depends on the client (are they marketing directors or IT directors? internal or external?), the budget, and the timescale, among many other things.
To wrap up, we’ll leave you with our checklist for building client sites with HTML5:
- Use the HTML5 doctype and character set.
- Use the simplified
- Use semantic class names that are representative of the new HTML5 elements. See @boblet‘s cheat sheet for more on this.
- Use block level links.
- Use the new form attributes and input types.
- Use the new
<video>media elements (but make sure they degrade gracefully).
- Plug the gaps with something like Modernizr.
If you think there’s anything more that we could be doing today, please let us know. I’m also keen to find out who is using HTML5 on client sites today. I’ve seen quite a few on the gallery, but it would be great to hear some arguments for and against building clients’ sites with HTML5 now.
- Guide to HTML5 Web Security (clerkendweller.com)
- 11 tips for HTML5 (slideshare.net)
- HTML5 Mastery: Semantics, Standards, and Styling (Friends of Ed) (i-programmer.info)
- Book Excerpt: Introducing HTML5 (java.sys-con.com)
- Making the html5 canvas interactive (stackoverflow.com)
- HTML5 and Jquery based Audio/Music Players (itzurkarthi.com)
- HTML 5 New Trend for Web Development-What is new.. (ashokabhat.wordpress.com)
- Render HTML5 in Old Versions of Internet Explorer (itrockx.wordpress.com)