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 10. Blackjack

Blackjack
  • the footer and header tags, which are new to HTML5

  • capturing key presses

  • programmer-defined objects

  • generating Image elements using a set of external image files

  • shuffling a deck of cards

Introduction

The objective of this chapter is to combine programming techniques and HTML5 and JavaScript features to implement the card game blackjack, also called 21. The implementation will make use of new tags introduced in HTML5, namely footer and header. We will make use of the footer to give credit to the source for the card images and the web site we are using for the shuffling algorithm. The cards are created using programmer-defined objects ...

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