I frequently get asked this question by people that are new to HTML5. As well as detailing lots of new elements HTML5 defines a number of new JavaScript APIs. When the HTML5 specification was formulated in 2004 it was felt that APIs were necessary to support the new elements that were created to support Web applications (below list taken from the W3C).

  • API for playing of video and audio which can be used with the new video and audio elements.
  • An API that enables offline Web applications.
  • An API that allows a Web application to register itself for certain protocols or media types.
  • Editing API in combination with a new global contenteditable attribute.
  • Drag & drop API in combination with a draggable attribute.
  • API that exposes the history and allows pages to add to it to prevent breaking the back button.

In practice most HTML5 development involves some form of JavaScript development. For example, you can use the default video controls that are provided by the browser, but f you want to customise the video controls you will need to script it using JavaScript.

If you are wanting to develop you HTML5 skills then a solid understanding of JavaScript is useful. I found that JavaScript Patterns by Stoyan Stefanov helped me appreciate and understand the language more deeply.