Skip to content

HTML 5 Code Camp Documentation

New Javascript features/APIs

Canvas: http://dev.w3.org/html5/spec/Overview.html#the-canvas-element, https://developer.mozilla.org/en/Canvas_tutorial, Media playback: http://dev.w3.org/html5/spec/Overview.html#video, http://dev.w3.org/html5/spec/Overview.html#audio Web Storage: http://dev.w3.org/html5/webstorage/ Drag and drop: http://html5doctor.com/native-drag-and-drop/ Online/Offline: http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#offline

Less strict markup, compared to xhtml

No need to end tags like p, img, etc. Simpler doctype. No need for quotations marks on element attributes, <html lang=no> is perfectly valid.

New semantic elements

No need for <div id="header"> anymore. We now have <header>, <footer>, <nav>, <section>, <article>, <aside>.

Observations

Neither <menu> or <command> works in any browser

It would be great to add a toolbar (rich text area) using the new <menu> and <command> elements, like this:

<menu type="toolbar">
    <command type="checkbox" onclick="..." label="strong" icon="bold.gif" />
    <command type="checkbox" onclick="..." label="em" icon="italic.gif" />
    <command type="checkbox" onclick="..." label="link" icon="link.gif" />
</menu>

However, none of the elements are supported in browsers yet.

Offline detection is pretty flaky

IE supports checking on navigator.onLine, but does not support listening for "online"/"offline" events. Chrome doesn't seem to support either.

Local storage works well

Seems to work well in Chrome, see http://robertnyman.com/html5/webstorage/webStorage.html.

Resources