May 29, 201214 yr I built my last sites using xhtml and they worked out fine but I haven't done anything for a few months now and am wondering should I now be looking to build any new sites in html5. The site I am going to build will be a website for an independent financial advisor with some tutorials similar to this one I did recently. Are there any drawbacks to using html5 and is it an easy transition from xhtml to html5? Cheers folks, Jason
May 29, 201214 yr Depends on which features you want to use. Some are widespread enough, you can use them now. Others are a little trickier. However, lack of browser support for a feature doesn't mean you can't use it. Take the placeholder for example. It won't work in IE, but a very simply, lightweight JavaScript, coupled with Modernizr, replicates it in IE. In other words, yes, start using it now. Start gradually introducing HTML features into your code. Replace your div=header with just header, etc etc. Just make sure that to cover your bases with browser compatibility, that you use the relevant shims/shivs/polyfills that you need. I actually wrote a short little article on polyfills, might come in useful: http://michaelgunner.co.uk/using-polyfills-to-replicate-html5css3-features-in-old-browsers/
May 29, 201214 yr Author Thanks Mike the site I'm building will actually be pretty straight forward I hope so some of the more complex features I shouldn't need I wouldn't of thought so hopefully they won't trip me up on lack of browser support. One of the things I'm particularly interested in though is a welcome video of the owner that could also be viewed on iphone, ipad etc.
May 29, 201214 yr Yh go for it, start making use of HTML5 now, it will become easier in the long run. For the very basic websites, you can pretty much code in complete HTML5.
May 29, 201214 yr The beauty of HTML5 is that it is intended to make things more logical and straightforward. Take the doctypes for example:- XHTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> HTML5 <!DOCTYPE html> You won't use all of HTML5's features straight away but there's nothing to stop you starting to use it now. Edited May 29, 201214 yr by oakleaves
May 29, 201214 yr Depends on what you client requires. Look at his stats and if he has lots of visitors using IE 7 and 8 then I would suggest sticking with XHTML. If not, go for it with HTML5. Good luck!
May 29, 201214 yr <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
May 29, 201214 yr Author Thanks for the replies guys really useful. Just to finish now I've had a little while to look at some of the new elements in html5...would I replace the div tag with a section tag if I say wanted 3 boxes of content side by side on a page? @neilOwen the client has a very old site at the moment that doesn't have any analytic's or any meaningful content so I doubt there is any danger I will be isolating any loyal visitors because I doubt there are any.
May 30, 201214 yr Here are some useful links, the first is about section tags:- https://developer.mozilla.org/en/Sections_and_Outlines_of_an_HTML5_document test your outline in http://gsnedders.html5.org/outliner/ Features enabled by each browser http://caniuse.com/#
May 30, 201214 yr Author IE8 and html5? According to w3 IE still has 18.3% of the market of which 11.8% is IE8 and previous.
May 30, 201214 yr Author <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> Damn I wish I had remembered you posted something about this before I clicked Add Reply
May 30, 201214 yr That Shim is only for a few base structural elements. To add support for other HTML5 elements in IE8, you need to look at other Polyfills, hence my post up top. So whenever you use a HTML5 feature, check browser support. If there's gaps in support, use a Polyfill for that feature, in combination with Modernizr. Modernizr is feature detection, it detects whether a browser supports a feature or not, and if it doesn't, it loads the Polyfill. So only browsers that need the Polyfill actually download it.
May 31, 201214 yr Author Cheers guys - Hows it going mteam been online lately might fancy a fix of some mw2 if your up for it one night?
May 31, 201214 yr Cheers guys - Hows it going mteam been online lately might fancy a fix of some mw2 if your up for it one night? I've played quite alot of mw3 I'm still rubbish It would be good to have a few games back on mw2 or bops. Not done any coding for a long time, I still need to look at getting to grips with wp just always seem to find something else to do
May 31, 201214 yr Author I've played quite alot of mw3 I'm still rubbish It would be good to have a few games back on mw2 or bops. Not done any coding for a long time, I still need to look at getting to grips with wp just always seem to find something else to do Think I sold MW3 will have to check but yeah defo up for some MW2 poss Bops at some point - i'm not back to work until next Wednesday so might as well get at least one game in before then. I haven't been on much of late so will defo be a bit rusty I reckon
Create an account or sign in to comment