Elements can easily be made draggable - the DOM provides a suite of methods and properties that can be used to interact with draggable elements very simply.
(function () {
var draggable = document.getElementById("draggable"),
target = document.getElementById("target");
draggable.setAttribute('draggable', 'true');
draggable.ondragstart = function (e) {
e.dataTransfer.effectAllowed = 'copy';
};
target.ondragover = function (e) {
if (e.preventDefault) e.preventDefault();
this.className = 'over';
e.dataTransfer.dropEffect = 'copy';
return false;
};
target.ondragleave = function () {
this.className = '';
};
target.ondrop = function (e) {
if (e.stopPropagation) e.stopPropagation();
this.className = 'dropped';
return false;
};
}());
For more information on drag and drop see http://dev.w3.org/html5/spec/Overview.html#dnd
The microdata format in HTML5 allows us to use existing and custom vocabularies to add meta data to information on the page. Firstly, we need to set the scope of the vocabulary we have chosen to an element:
<section itemscope itemtype="http://url-to-vocabulary.com">
Then, use the 'itemprop' attribute to define the type of content that is contained in the element.
<section itemscope itemtype="http://url-to-vocabulary.com">
<p itemprop="name">Cathy Lill</p>
</section>
For more information on Microdata go to http://dev.w3.org/html5/md/
There is a large collection of new form input types that provide a richer, more meaningful user experience, and can also convey more detailed information about form controls to screen reader users. Here is a few examples.
For more information on the new form in HTML5 go to http://diveintohtml5.org/forms.html