I'm overhauling my blog and … is HTML5 OK?
문제
I'm overhauling my blog (http://gilesvangruisen.com/) and I'm going to be pushing new technologies as much as possible.
I'm a web designer/developer and the browser percentage is as follows: 42% Firefox 39% Safari 7% Chrome 7% IE
Is it OK to use the HTML5 doctype for my "rethunk" site?
I thank you. -Giles :)
해결책
You can safely use the HTML5 doctype <!doctype html>
and it will just render as HTML strict on most browsers, including IE6. Only caveat is that the new HTML5 elements (i.e. header
, footer
, input type="number"
, etc) isn't directly supported by all browsers, including the current versions.
다른 팁
You should feel comfortable using HTML5. To detect which browsers support some of the next generation browser technologies, you should use a tool like modernizr.
This site is really useful for comparing browser support for features: http://caniuse.com/
Also, you can click "Import stats", which lets you link your Google Analytics profile to the page so it tailors the responses to your site's browser access numbers.
I would give serious thought to using the HTML5 Boilerplate as a starting point. It's HTML5 (obviously) but has been tested for compatibility with a variety of different browsers to make sure it still displays correctly everywhere. It also has jQuery, Modernizr, and normalizr wired in so you've got a good foundation on which to build.
I've never used it for a mostly static site, but it has proven a good starting point for our various apps.