Saturday, July 23, 2011

Thoughts on HTML5

Let me preface this post by stating that I am one of those coders that believes in doing things the right way. It is absolutely appalling to come across messy, uncommented code that leaves you scratching your head trying to figure out exactly what it does. Its just as appalling to come across a website, look at the code and discover that they used tables for the layout of the site. To top it off, none of their tags are closed making people with my coding beliefs shudder.

I know there are people out there reading this who say "So what? What's the big deal?". There are standards out there for a reason. Granted they are a bit more enforced in HTML when you use the XHTML standard as you are forced to close your tags, but that still doesn't stop people from using tables for the layout of their site.

I have been looking at HTML5 as a means for creating my new website and am finding that there are things I do and don't like about it currently. One of the things that I am non-plused by, but am going to have to live with is that the people responsible for HTML5 regressed and decided not to enforce the need to close all of your tags, as XHTML required.

I found this to be a good thing, forcing coders to make their code a bit nicer and actually pay attention to the details. By opening this up and allowing people to use thier own styling choice, this is going to make supporting someone elses HTML5 code a bit of a headache.

That point aside, I am finding that to code in HTML5, you have to add a lot of checks into your code to see if certain new add-ons are supported in the browser that is accessing your site. For instance, with forms, they have added a lot of new types which make browsers that support them have a bit more intuitive reactions to those fields (like date pickers or color pickers for dates, or even the email type that tells a mobile browser to configure it keyboard to support email addresses specifically). Unfortunately, at this time, the only browser out there that has support for all the forms additions in Opera. While Opera supports a lot of HTML5, not a lot of people use Opera. Its use is dwarfed by that of Firefox and Chrome.

I have been really thinking about whether I want to use HTML5 and write the code to do the tests, but that really isn't going to be an option going forward. HTML5 is out there and is here to stay. The support in browsers will only continue to increase but the concern is going to be users. There are too many people out there using older versions of browsers. Listen people (you know who you are), just because its working for you doesn't mean its right. You are not only forcing a lot of developers to code for the fact that you are refusing to update, you are actually not getting the proper experience out of a lot of websites that the rest of us are.

I guess I will just have to suck it up, code it once and reuse it.

No comments:

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.