Whats new in HTML5?
HTML4 has been with us for a while now, roughly ten years. And it hasn't really seen a major update. Sure there's XHTML, but that did little more than make things slightly stricter - making you write better quality code if you were at all concerned with compliance. HTML5 does more than that. For one thing it adds a few new features. Not a huge amount, but the ones that it does add are very useful.
Work on HTML5 started way back in 2004, and now it's starting to get interesting. Browser support is increasing, and the element I'm most interested in - CANVAS - is supported by four out of the major five browsers.
So what's new?
- <canvas>
<canvas> is a 2D (at the moment - other dimensions may be forthcoming) drawing area controlled by Javascript. You can use it for a wide variety of things - graphs, games, presentations etc. Because it's controlled by Javascript you can interact with it very easily. An example is the tooltips feature I've added to RGraph. In short, click on a bar and you get a tooltip that can contain a wide variety of HTML - images videos etc. I've written a short primer to the <canvas> tag here.
- <video>
The <video> tag makes it easier to embed video clips into your web pages. It has attributes like src (naturally), autoplay and loop. The <video> tag has implications on usability (eg blind access), and so can contain additional markup describing the video. Ideally, the full transcript of the video.
- <audio>
The <audio> tag is much like the <video>, but for audio files. Surprisingly.
- Context menus
HTML5 provides a method of defining context menus, making it easier to use these in web applications. Perhaps not so useful for websites, but certainly for applications where context menus could provide a raft of options without taking up space in the UI.
- New structural elements
Since HTML is largely unstructured, a few new elements have been provided to try and rectify this. These elements include:
- New inline elements
HTML5 introduces new elements to help indicate basic elements such as times or numbers.
- New form input types
The input element can now have a new set of types, including:
Some of these are already common in desktop UIs, so shouldn't be difficult to implement, and will be more familiar to users when filling out your form.
- Dropped elements
The folling elements have been dropped or replaced:
2. applet
- Character encoding syntax
The character encoding syntax for a HTML5 document is now: <meta charset="UTF-8">
- New interactive elements
Some nice things that will make building websites and, perhaps more pointedly, web applications, easier.
<menu> - Previously a deprecated element, <menu> is back in HTML5 with a new meaning. It can, for example, contain <command> elements which cause a particular action to happen. For example you could use this element to provide a toolbar of sorts, or a context menu (see above). It can have label and icon attributes. They can be nested to provide multiple levels of menus. - New DTD
HTML5 has a new, much simpler DTD: <!doctype html> Much nicer I think you'll agree and far more memorable. As I understand it, this results from HTML not being associated with SGML any more.
- Optional href on links
This is now optional as links can be used in conjunction with scripting. Perhaps more useful in web applications as opposed to web sites.
- The async attribute
This stipulates that a block of script can be executed asynchronously, instead of blocking the rest of the page until it's finished.
Labels: html
1 Comments:
As a html designer I try to learn about html5,in my observation they put additional codes but the same function.
Post a Comment
Subscribe to Post Comments [Atom]
<< Home