Sadly, most of the code I've written this week has been boring code for a very unboring project. So instead of going on and on about .getElementById and textContent, I decided to devote the non-Sherlock-watching time of my Friday night understanding whatever HTML5 is.
Honestly, I haven't paid much attention to the various *tmls. XHTML, HTML[num], etc, didn't matter to me. I had real coding to do. The vague things I heard about HTML5 made it seem like yet another buzzword for "hip" business to claim they used. (I guess I technically used it in one of my Chrome Extensions that never got anywhere).
After reading through large portions of Dive in to HTML5, (and quite a few really lousy tutorials) I realized just how wrong I was. Let me try and summarize a few important bits:
There's no such thing as "HTML5 compliant." HTML5's goodness is made up of lots of component parts, including <canvas>, <video>, and non-tag items like localStorage. Support for these components depends on browsers. (You can check your browser here or the whole browser ecosystem here).
I'm glad we've finally got a competent <video> element which embeds a video on the page (surprise!). <img> has been around since the early 90's. Gifs have been sort of a stop-gap measure between the two, but they're slooooow. One of the brilliant things about <video> is how it approaches the multi-format nature of video. Web designers can point to multiple video files, and the browser can select one of the format it supports.
Local storage is another nice thing in the bat-toolbelt of HTML5. While it's not exactly a tag, it allows websites to store data local to your machine. Privacy "advocates" will probably yell and scream at this one, but the data can only be accessed by the website that put it there. Local storage should not be used to store sensitive data, as it can be retrieved/modified by anyone with physical access to your machine. I technically used this feature in my BlogMe extension.
Another thing that privacy advocates won't be happy about is Geolocation, which speaks for itself. Fortunately, most browsers will ask for permission before giving away location-specific data. This isn't technically HTML5, but is part of the feature set that the "new web" is bringing. (What are we up to now, Web 8.0?)
There are many, many other cool features of HTML5 that will save lots of time and make life easier for everyone. If you're interested in finding out more, read the full tutorial I linked to at the beginning. It's wordy but worth it.
No comments:
Post a Comment