O'Reilly logo

The Essential Guide to HTML5: Using Games to Learn HTML5 and JavaScript by Jeanine Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Quiz

Quiz
  • creating HTML by code

  • positioning and repositioning HTML elements

  • responding to clicks of the mouse

  • arrays of arrays

  • playing video

Introduction

This chapter demonstrates how HTML elements can be created dynamically and then positioned and repositioned on the screen. This is in contrast not only to drawing on a canvas element but also to the old way of creating static web pages. Our goal is to produce a quiz in which the player must match the names of countries and capital cities. We will use an array of arrays to hold the necessary information and build on the game to give more feedback to the player, including playing a video clip as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required