I was reading a good article earlier about the up and coming HTML 5. Well, I say up and coming, it'll probably be like the up and coming CSS 3 - won't be able to use it for another 5 years because Microsoft won't have updated their browsers to support it. Come on Microsoft! Nonetheless, HTML 5 looks to bring a lot of new features to the table that increasingly mimics XML - hence XHTML.
You may read the specification here, but as it's one of the longest, and possibly most tedious pages on the Internet, I somehow doubt you'll want to read it all.
The upshot of it all is they're introducing some pretty nifty features to HTML 5. I read somewhere they're actually discarding H1, H2, H3, etcetera... and just using a single <h> node which can then accept an attribute to set its header level. That wasn't mentioned in this article though.
Going with the XML ways, their tags are now a lot more descriptive. Instead of the ambiguous
(one for Karl) <div> nodes, they're going for the more description approach. Namely:
- <header>
- <nav>
- <article>
- <section>
- <aside>
- <footer>
This allows you to actually
describe exactly what the section is, whether it's a navigational block or a simple footer. This will make it much easier for us programmers to harvest the data from websites, as well. We'll know
exactly where the headers start and end. One question I do have is the following: are copyright laws going to be re-worked in this new era of interoperability?
They also seem to have really extended onto the media side of things, too. In HTML 4.01 you could just simply embed music or videos using ActiveX - until Flash came along. Let's hope that the new HTML 5 media nodes utilise Flash otherwise I feel that will be the end of Flash as we know it - especially with their release of ActionScript 3, way to over-complicate matters, Adobe!
html4strict Code:
<video src="video.ogv" controls poster="poster.jpg"
width="320" height="240"> <a href="video.ogv">Download movie
</a></video>
Above is a simple example on how you would embed a film into your website. You specify the poster image as well which allows browsers to bring up further information about the film before you go ahead and watch it. I assume this information will also allow them to tie it in with services such as iTunes.
All browsers, it seems, are going to have a native UI which can be switched on and off. There will also be the option of adding buttons, in pure HTML, to your website to control the media blocks. You can even specify which codecs the video and/or music requires, which will be a life saver as I find WMP often doesn't know what codec I'm supposed to have to watch a particular video. Up until now I've relied on VLC supporting every single one of them.
This is how you will be able to add a play button:
html4strict Code:
<button type="button" onclick="video.play();">Play
</button>
It seems HTML 5 is really bringing about a lot of change to the all-too-familiar, and out-dated, HTML 4.01! Exciting times are these! If you wish to read the article then please
lose yourself over here.