Friday, January 21, 2011

HTML5

There has been a lot of talk about HTML5 (XHTML5) for a while, and I've heard it come up again recently.
I previously looked at it briefly but dropped it after seeing the spotty browser support (which is still true today)
But here I am giving it another chance because of all the hype to see if it lives up to it.

First off, HTML5 is not a W3C recommendation yet. Almost 3 years since it's first draft and it is still in a working draft state.
This version of HTML/XHTML is long overdue considering the last versions were about 11-12 years ago.
The spec appears to be updating frequently (almost daily lately) and includes this warning:
Implementors should be aware that this specification is not stable. Implementors who are not taking part in the discussions are likely to find the specification changing out from under them in incompatible ways.
The major browsers are part of the HTML5 group but that doesn't help support for the spec.

There seems to be a lot of new features but most seem to be JavaScript or Flash related.
Such as trying to reduce the repetitive JavaScript input validation or remove the need for Flash to provide video/animations/graphics.

So here are the interesting areas I see (most from my favorite html reference):
  • New elements for providing video/audio/canvas (as opposed to Flash)
  • Raw access to video and canvas images
  • Official client side storage using Web Storage (sessionStorage/localStorage act as map)
  • Storage security is domain based, so insecure on shared hosting sites
  • Better access to elements using Selectors API (document.querySelector/querySelectorAll)
  • New selectors resemble functionality in libraries like JQuery
  • New form controls (only Opera seems to support at the moment)
  • New input types such as number and dates (also email, url, color)
  • Date inputs include date, time, datetime (utc), and datetime-local (also month and week)
  • Required attribute for validation on input
  • Min/max attributes for numeric range validation on input
  • Pattern attribute for regex validation on input
  • New javascript events (such as onerror and oninvalid)
  • Last but not least, removing elements we grew up using (font, center, frame)
Definitely some tempting new features, especially the form validations.
The selectors api and web storage are already available across all browsers, but little else.
Browser support would make this all seem more realistic and worth the effort of learning, and it will be someday.

I just don't think it is worth the hype right now.
For example, I see lots of HTML5 examples including this one that attempts to show the new features. No browser fully supports the canvas element in HTML5 yet, so this page uses the partial WebKit canvas support in Google Chrome Frame (designed for IE) to display it.

No comments:

Post a Comment