views:

691

answers:

4

I'd like to start using HTML5's basic features, but at the same time, keep my code backwards compatible with older browsers (graceful degradation). For instance, I'd like to use the cool CSS3 properties for making rounded corners. Is there any available tutorial for writing gracefully degradable HTML5 ?

Additionally, what browsers should I support so that my app. is functional for at least 95% of visitors? What are the ways to test those browsers painlessly ?

+2  A: 

When talking about HTML5 or CSS3, you should head over to:

When can I use...

As can be seen, we are still far far away from using that.

Also, since old versions of the browsers won't support HTML5 or CSS3, however, you can do what is known as:

Progressive Enhancement and Graceful Degradation

Here are some resources also:

Sarfraz
I know I can do that... My question was how to do Graceful Degradation specifically for HTML5.
Olivier Lalonde
@Olivier Lalonde: The Graceful Degradation is not specific to anything like html5. There are a host of resources on that you might want to google about. Thanks
Sarfraz
Great resource, exactly what I was looking for.
Olivier Lalonde
@Olivier Lalonde: You are welcome.......
Sarfraz
@Olivier Lalonde: This is silly but note that your accept rate is way too low, consider accepting (right mark) the answers you find useful.
Sarfraz
A: 

Browsers that, collectively, cover 95% of the world: Firefox, Chrome, IE6/7/8. The best way to test them is to install them on your computer.

Rob
@Rob - Good idea but...installing IE6/7/8 is a particular pain in the ass :)
Nick Craver
So is IE6/7/8..
Rob
That's what VMs are for. The hard part is finding a VM image that still has IE6 on it.
Xanthir
Or you could use something like SuperPreview etc that does compatability checks :)
Thqr
A: 

Graceful Degradation is all about making compromises -- if you could do everything in the lower version, you probably would. To pick on the example of rounded corners you cite, it may acceptable to you (or your client) to live without them, where there don't exist renderer specific CSS extensions to support them (this is how http://www.ipswich-angle.com/ handles it, for example, I believe). Other options involving images are there, but it is largely dependant on what compromises you and your client are willing to make.

Rowland Shaw
+2  A: 

The ultimate solution for graceful degradation with HTML5 is to use the new doctype to trigger HTML5 and then use none of the new features that HTML5 makes available. This way your code is specified as HTML5 but is entirely compatible with HTML4.01.

+1 for making me laugh.
Thqr