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 HTML 5 in mind? Naturally, I was happy to answer that one! It went a little like this:

Me:

We’ll build the whole thing with HTML 5 if that’s okay with you guys. One question though: do you know what percentage of your visitors use Internet Explorer without JavaScript to view your site?

Client:

Erm, I don’t really know, and I wouldn’t want to lose those visitors. Maybe we’d better not build it in HTML 5 after all.

Me:

Whoa there! No need to be so hasty. We don’t have to use HTML 5 exclusively, but we can still use it to develop specific parts of the site. How does that sound? order viagra in canada

Client:

Great! Let’s do it!

After telling Remy about this conversation, he proposed that we cover this subject in an article, so here we are!

We’re treating this article a bit differently, like a Q & A with the authors, so let us know if you like this new style.

Which bits of HTML 5 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:

For a clearer idea of what is or isn’t cross-browser compatible, check out these sites from Molly Holzschlag and Alex Deveria.

Remy: Assess the technology and fit it to your project. If I have a lot of IE 6 users, I avoid using PNG s. If I have a lot of IE users with JavaScript disabled, I give them reduced markup as Rich pointed out earlier (e.g., simplified doctype, <script> , and <style> elements) but avoid using new block-level elements like <section> . If they have a very interactive product that relies on JavaScript anyway, I don’t have any qualms using JavaScript to help IE style the new elements.

Also, I’m going to detect Web Forms 2.0 and other HTML 5-type support using something like Modernizr, and then fall back on “traditional” JavaScript for things like date pickers if they’re not available natively.

What are the benefits of using HTML 5 now?

Rich: Here are several, in no particular order:

Cleaner markup

Additional semantics of new elements like <header> , <nav> , and <time>

, , and 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 HTML 5 becomes the mainstream markup language. Use this as a selling point when talking with your clients

What are the downsides to using HTML 5 now?

Rich: Obviously, you make some trade-offs when using HTML 5:

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 HTML 5?

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 HTML 5 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 HTML 5 (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 HTML 4, XHTML , or HTML 5 as a menu item either.

Will using HTML 5 negatively affect my clients’ search engine rankings?

Rich: No. Google is properly indexing sites built with HTML 5. Take our site for example — it’s doing just fine. ;)

Have you built any client sites with HTML 5?

Rich & Remy: We’ve both started using things like the simplified doctype and reduced markup in our client work. We’ve also used HTML 5 on a lot of professional projects where we’re our own clients, such as Speak the Web and the 2009 Full Frontal JavaScript Conference.

We haven’t used it as much for full-fledged HTML 5 apps that use all the new markup and new API s – 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 HTML 5 elements.

So should I be using HTML 5 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 HTML 5:

Use the HTML 5 doctype and character set.

5 doctype and character set. Use the simplified <script> and <style> elements.

and elements. Use semantic class names that are representative of the new HTML 5 elements. See @boblet‘s cheat sheet for more on this.

5 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 <audio> and <video> media elements (but make sure they degrade gracefully).

and media elements (but make sure they degrade gracefully). Plug the gaps with something like Modernizr.