API usage
Now that we've discussed what all of the game elements are and how each HTML5 feature was used to fulfill that role, let's take a deeper look at how to make the most out of each of these APIs. For each of the following APIs, we'll provide a more concrete definition of the feature, what its intended use is, and a code example will follow. You may also refer to the complete source code attached at the end of the chapter in order to fill the gap between the code sample and how that feature fits in with the rest of the game code base. It is also recommended that you code along and play with the various settings and values in order to experiment with and more fully understand each API.
Web forms
The new HTML5 web forms API adds 13 new input types that allows for a much more flexible and powerful experience. What's more, web forms are also able to validate themselves requiring zero JavaScript intervention.
New input types
The following are the new input types defined in the new web forms...